* [patch] phy: rockchip-inno-usb2: remove an unneeded check
[not found] ` <81fc5933-7bee-2d83-f8ef-a951355c4248-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-11-25 11:18 ` Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-11-25 11:18 UTC (permalink / raw)
To: Kishon Vijay Abraham I, wlf
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Heiko Stuebner
"rphy->edev" can't be an error pointer so we can remove the check and
pull the code in an indent level.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/phy/phy-rockchip-inno-usb2.c b/drivers/phy/phy-rockchip-inno-usb2.c
index 2f99ec9..7494210 100644
--- a/drivers/phy/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/phy-rockchip-inno-usb2.c
@@ -995,14 +995,11 @@ static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy,
goto out;
}
- if (!IS_ERR(rphy->edev)) {
- rport->event_nb.notifier_call = rockchip_otg_event;
-
- ret = extcon_register_notifier(rphy->edev, EXTCON_USB_HOST,
- &rport->event_nb);
- if (ret)
- dev_err(rphy->dev, "register USB HOST notifier failed\n");
- }
+ rport->event_nb.notifier_call = rockchip_otg_event;
+ ret = extcon_register_notifier(rphy->edev, EXTCON_USB_HOST,
+ &rport->event_nb);
+ if (ret)
+ dev_err(rphy->dev, "register USB HOST notifier failed\n");
out:
return ret;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-25 11:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <81fc5933-7bee-2d83-f8ef-a951355c4248@rock-chips.com>
[not found] ` <81fc5933-7bee-2d83-f8ef-a951355c4248-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-11-25 11:18 ` [patch] phy: rockchip-inno-usb2: remove an unneeded check Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).