Skip to content
Permalink
Browse files
usb: misc: usb5744: fix error handling for reset-gpio
In case of error regarding reset-gpio handling, the proper error value
is propagated further.

Signed-off-by: Piyush Mehta <piyush.mehta@xilinx.com>
  • Loading branch information
Piyush Mehta authored and Michal Simek committed Jan 11, 2022
1 parent 0e8c25e commit 6ca1f4cd372fb97452dda4dfe6e79e285d604776
Showing 1 changed file with 4 additions and 2 deletions.
@@ -31,8 +31,10 @@ static int usb5744_init_hw(struct device *dev, struct usb5744 *data)

data->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(data->reset_gpio)) {
dev_err(dev, "Failed to bind reset gpio");
return -ENODEV;
dev_err_probe(dev, PTR_ERR(data->reset_gpio),
"Failed to request reset GPIO %d, errcode",
PTR_ERR(data->reset_gpio));
return PTR_ERR(data->reset_gpio);
}

if (data->reset_gpio) {

0 comments on commit 6ca1f4c

Please sign in to comment.