diff options
author | Kangjie Lu <kjlu@umn.edu> | 2019-03-25 06:08:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-26 10:42:52 +0300 |
commit | 1a137b47ce6bd4f4b14662d2f5ace913ea7ffbf8 (patch) | |
tree | 7e4c3959a045eade84af2ad671329517bc2ae678 /drivers/usb/storage | |
parent | f926da42218c9d6a6e34a314cd5c9535bcd81627 (diff) | |
download | linux-1a137b47ce6bd4f4b14662d2f5ace913ea7ffbf8.tar.xz |
usb: sierra: fix a missing check of device_create_file
device_create_file() could fail and return an error code. The fix
captures the error and returns the error code upstream in case it
indeed failed.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/sierra_ms.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/storage/sierra_ms.c b/drivers/usb/storage/sierra_ms.c index 6ac60abd2e15..e605cbc3d8bf 100644 --- a/drivers/usb/storage/sierra_ms.c +++ b/drivers/usb/storage/sierra_ms.c @@ -194,8 +194,6 @@ int sierra_ms_init(struct us_data *us) kfree(swocInfo); } complete: - result = device_create_file(&us->pusb_intf->dev, &dev_attr_truinst); - - return 0; + return device_create_file(&us->pusb_intf->dev, &dev_attr_truinst); } |