From: Fabio Estevam <fabio.estevam@xxxxxxx> 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.estevam@xxxxxxx> --- drivers/usb/phy/phy-generic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c index 89d6e7a..675a716 100644 --- a/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c @@ -263,8 +263,7 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop, dev_err(dev, "Error requesting RESET or VBUS GPIO\n"); return err; } - if (nop->gpiod_reset) - gpiod_direction_output(nop->gpiod_reset, 1); + gpiod_direction_output(nop->gpiod_reset, 1); nop->phy.otg = devm_kzalloc(dev, sizeof(*nop->phy.otg), GFP_KERNEL); -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html