Revert "USB: bcma: Add a check for devm_gpiod_get"
authorRafał Miłecki <rafal@milecki.pl>
Tue, 31 Aug 2021 06:54:19 +0000 (08:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Sep 2021 08:10:59 +0000 (10:10 +0200)
commit302e60e26ad5b1998f71bfaf622e80d9e407eea3
tree62dc4769d321d1bf1adbe46de59638a4bdbdbc52
parentb33b3db476e69a6e09e8e6d9197013337a282352
Revert "USB: bcma: Add a check for devm_gpiod_get"

commit d91adc5322ab53df4b6d1989242bfb6c63163eb2 upstream.

This reverts commit f3de5d857bb2362b00e2a8d4bc886cd49dcb66db.

That commit broke USB on all routers that have USB always powered on and
don't require toggling any GPIO. It's a majority of devices actually.

The original code worked and seemed safe: vcc GPIO is optional and
bcma_hci_platform_power_gpio() takes care of checking the pointer before
using it.

This revert fixes:
[   10.801127] bcma_hcd: probe of bcma0:11 failed with error -2

Fixes: f3de5d857bb2 ("USB: bcma: Add a check for devm_gpiod_get")
Cc: stable <stable@vger.kernel.org>
Cc: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20210831065419.18371-1-zajec5@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/bcma-hcd.c