aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorWei Yongjun2017-01-25 14:02:48 +0000
committerPeter Chen2017-02-03 16:48:47 +0800
commit753dfd23612dfb4b585b7814a94237987fdf3359 (patch)
tree197399f963c068dea64ef5b29017f2feb538bd9a /drivers/usb
parent490b63e6de63d13e82110f4cb5f1aa31dd27245a (diff)
usb: chipidea: msm: Fix return value check in ci_hdrc_msm_probe()
In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 2fc305be364e ("usb: chipidea: msm: Mux over secondary phy at the right time") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Stephen Boyd <stephen.boyd@linaro.org> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/chipidea/ci_hdrc_msm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c
index f1ede7909f54..0bdfcdcbf7a5 100644
--- a/drivers/usb/chipidea/ci_hdrc_msm.c
+++ b/drivers/usb/chipidea/ci_hdrc_msm.c
@@ -218,8 +218,8 @@ static int ci_hdrc_msm_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
ci->base = devm_ioremap_resource(&pdev->dev, res);
- if (!ci->base)
- return -ENOMEM;
+ if (IS_ERR(ci->base))
+ return PTR_ERR(ci->base);
ci->rcdev.owner = THIS_MODULE;
ci->rcdev.ops = &ci_hdrc_msm_reset_ops;