mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
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: 2fc305be36
("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>
This commit is contained in:
parent
490b63e6de
commit
753dfd2361
1 changed files with 2 additions and 2 deletions
|
@ -218,8 +218,8 @@ static int ci_hdrc_msm_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||||
ci->base = devm_ioremap_resource(&pdev->dev, res);
|
ci->base = devm_ioremap_resource(&pdev->dev, res);
|
||||||
if (!ci->base)
|
if (IS_ERR(ci->base))
|
||||||
return -ENOMEM;
|
return PTR_ERR(ci->base);
|
||||||
|
|
||||||
ci->rcdev.owner = THIS_MODULE;
|
ci->rcdev.owner = THIS_MODULE;
|
||||||
ci->rcdev.ops = &ci_hdrc_msm_reset_ops;
|
ci->rcdev.ops = &ci_hdrc_msm_reset_ops;
|
||||||
|
|
Loading…
Reference in a new issue