@@ -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;
"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>