diff options
author | zhaoxiao <long870912@gmail.com> | 2021-09-06 07:27:30 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2021-09-29 23:05:05 +0200 |
commit | ed2f85115a8e3423b68d8ac39aa7751c0779ce30 (patch) | |
tree | 029cf9646b6339f591786fc97a7fa3788fc0a5e4 | |
parent | i2c: rcar: enable interrupts before starting transfer (diff) | |
download | linux-ed2f85115a8e3423b68d8ac39aa7751c0779ce30.tar.xz linux-ed2f85115a8e3423b68d8ac39aa7751c0779ce30.zip |
i2c: bcm-kona: Fix return value in probe()
When call function devm_platform_ioremap_resource(), we should use IS_ERR()
to check the return value and return PTR_ERR() if failed.
Signed-off-by: zhaoxiao <long870912@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
-rw-r--r-- | drivers/i2c/busses/i2c-bcm-kona.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-bcm-kona.c b/drivers/i2c/busses/i2c-bcm-kona.c index ed5e1275ae46..8e350f20cde0 100644 --- a/drivers/i2c/busses/i2c-bcm-kona.c +++ b/drivers/i2c/busses/i2c-bcm-kona.c @@ -763,7 +763,7 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev) /* Map hardware registers */ dev->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dev->base)) - return -ENOMEM; + return PTR_ERR(dev->base); /* Get and enable external clock */ dev->external_clk = devm_clk_get(dev->device, NULL); |