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:
09e2a8b
)
USB: bcma: Add a check for devm_gpiod_get
author
Chuhong Yuan
<hslester96@gmail.com>
Wed, 16 Oct 2019 08:35:32 +0000
(16:35 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 4 Nov 2019 14:50:38 +0000
(15:50 +0100)
bcma_hcd_probe misses a check for devm_gpiod_get and may miss
the error.
Add a check for it and return the error if a failure occurs.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link:
https://lore.kernel.org/r/20191016083531.5734-1-hslester96@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/bcma-hcd.c
patch
|
blob
|
history
diff --git
a/drivers/usb/host/bcma-hcd.c
b/drivers/usb/host/bcma-hcd.c
index
2400a82
..
652fa29
100644
(file)
--- a/
drivers/usb/host/bcma-hcd.c
+++ b/
drivers/usb/host/bcma-hcd.c
@@
-406,9
+406,12
@@
static int bcma_hcd_probe(struct bcma_device *core)
return -ENOMEM;
usb_dev->core = core;
- if (core->dev.of_node)
+ if (core->dev.of_node)
{
usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
GPIOD_OUT_HIGH);
+ if (IS_ERR(usb_dev->gpio_desc))
+ return PTR_ERR(usb_dev->gpio_desc);
+ }
switch (core->id.id) {
case BCMA_CORE_USB20_HOST: