USB: msm_otg: Remove regulator NULL check references
Regulator API provides nop definitions when regulator feature
is disabled. regulator_get returns NULL and other API return
'0' to indicate success. Hence remove regulator NULL check.
IS_ERR check would suffice.
Change-Id: I9f552950c601fce0831bf723c61fa1afebce07ad
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c
index 4658469..6c60cc9 100644
--- a/drivers/usb/otg/msm_otg.c
+++ b/drivers/usb/otg/msm_otg.c
@@ -215,12 +215,12 @@
{
int ret = 0;
- if (!hsusb_1p8 || IS_ERR(hsusb_1p8)) {
+ if (IS_ERR(hsusb_1p8)) {
pr_err("%s: HSUSB_1p8 is not initialized\n", __func__);
return -ENODEV;
}
- if (!hsusb_3p3 || IS_ERR(hsusb_3p3)) {
+ if (IS_ERR(hsusb_3p3)) {
pr_err("%s: HSUSB_3p3 is not initialized\n", __func__);
return -ENODEV;
}