diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2020-05-23 13:45:25 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-05-25 13:40:47 +0200 |
commit | b5d9ff10dca49f4d4b7846c3751c6bec50d07375 (patch) | |
tree | f8cbc441159edfbb53ec7d8b06dc0e774ecebf4c /drivers/pinctrl/bcm/pinctrl-bcm281xx.c | |
parent | Merge tag 'sh-pfc-for-v5.8-tag2' of git://git.kernel.org/pub/scm/linux/kernel... (diff) | |
download | linux-b5d9ff10dca49f4d4b7846c3751c6bec50d07375.tar.xz linux-b5d9ff10dca49f4d4b7846c3751c6bec50d07375.zip |
pinctrl: Fix return value about devm_platform_ioremap_resource()
When call function devm_platform_ioremap_resource(), we should use IS_ERR()
to check the return value and return PTR_ERR() if failed.
Fixes: 4b024225c4a8 ("pinctrl: use devm_platform_ioremap_resource() to simplify code")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Link: https://lore.kernel.org/r/1590234326-2194-1-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/bcm/pinctrl-bcm281xx.c')
-rw-r--r-- | drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c index f690fc5cd688..71e666178300 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c @@ -1406,7 +1406,7 @@ static int __init bcm281xx_pinctrl_probe(struct platform_device *pdev) pdata->reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pdata->reg_base)) { dev_err(&pdev->dev, "Failed to ioremap MEM resource\n"); - return -ENODEV; + return PTR_ERR(pdata->reg_base); } /* Initialize the dynamic part of pinctrl_desc */ |