projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6813e35
)
greybus: properly drop device reference
author
Alex Elder
<elder@linaro.org>
Mon, 20 Oct 2014 15:27:55 +0000
(10:27 -0500)
committer
Greg Kroah-Hartman
<greg@kroah.com>
Mon, 20 Oct 2014 22:25:54 +0000
(06:25 +0800)
Drop the USB device reference taken at the top of ap_probe() in the
event greybus_create_hd() fails.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/es1-ap-usb.c
patch
|
blob
|
history
diff --git
a/drivers/staging/greybus/es1-ap-usb.c
b/drivers/staging/greybus/es1-ap-usb.c
index
21fe4fd
..
21db78f
100644
(file)
--- a/
drivers/staging/greybus/es1-ap-usb.c
+++ b/
drivers/staging/greybus/es1-ap-usb.c
@@
-386,8
+386,10
@@
static int ap_probe(struct usb_interface *interface,
udev = usb_get_dev(interface_to_usbdev(interface));
hd = greybus_create_hd(&es1_driver, &udev->dev);
- if (!hd)
+ if (!hd) {
+ usb_put_dev(udev);
return -ENOMEM;
+ }
es1 = hd_to_es1(hd);
es1->hd = hd;