diff options
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index d9d9340abe60..57f2e1032086 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -1230,6 +1230,8 @@ made_compressed_probe: | |||
1230 | i = device_create_file(&intf->dev, &dev_attr_wCountryCodes); | 1230 | i = device_create_file(&intf->dev, &dev_attr_wCountryCodes); |
1231 | if (i < 0) { | 1231 | if (i < 0) { |
1232 | kfree(acm->country_codes); | 1232 | kfree(acm->country_codes); |
1233 | acm->country_codes = NULL; | ||
1234 | acm->country_code_size = 0; | ||
1233 | goto skip_countries; | 1235 | goto skip_countries; |
1234 | } | 1236 | } |
1235 | 1237 | ||
@@ -1238,6 +1240,8 @@ made_compressed_probe: | |||
1238 | if (i < 0) { | 1240 | if (i < 0) { |
1239 | device_remove_file(&intf->dev, &dev_attr_wCountryCodes); | 1241 | device_remove_file(&intf->dev, &dev_attr_wCountryCodes); |
1240 | kfree(acm->country_codes); | 1242 | kfree(acm->country_codes); |
1243 | acm->country_codes = NULL; | ||
1244 | acm->country_code_size = 0; | ||
1241 | goto skip_countries; | 1245 | goto skip_countries; |
1242 | } | 1246 | } |
1243 | } | 1247 | } |