projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f926da4
)
usb: sierra: fix a missing check of device_create_file
author
Kangjie Lu
<kjlu@umn.edu>
Mon, 25 Mar 2019 03:08:28 +0000
(22:08 -0500)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 26 Mar 2019 07:42:52 +0000
(16:42 +0900)
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>
drivers/usb/storage/sierra_ms.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/storage/sierra_ms.c
b/drivers/usb/storage/sierra_ms.c
index 6ac60abd2e15cf7021da4f2a29784c64558c6d54..e605cbc3d8bf2da8645dbf456808f63faf65f74a 100644
(file)
--- 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);
}