From: Fabio Estevam <fabio.este...@nxp.com>

The gpiod API checks for NULL descriptors, so there is no need to
duplicate the check in the driver.

Signed-off-by: Fabio Estevam <fabio.este...@nxp.com>
---
 drivers/usb/gadget/udc/pxa27x_udc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c 
b/drivers/usb/gadget/udc/pxa27x_udc.c
index d48e239..404ae6d 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -2475,8 +2475,7 @@ static int pxa_udc_probe(struct platform_device *pdev)
                        PTR_ERR(udc->gpiod));
                return PTR_ERR(udc->gpiod);
        }
-       if (udc->gpiod)
-               gpiod_direction_output(udc->gpiod, 0);
+       gpiod_direction_output(udc->gpiod, 0);
 
        udc->clk = devm_clk_get(&pdev->dev, NULL);
        if (IS_ERR(udc->clk))
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to