mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 22:20:56 +07:00
i2c: nomadik: Don't use IS_ERR for devm_ioremap
devm_ioremap() returns NULL on error, not an error. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
This commit is contained in:
parent
47bb27e788
commit
37e5eb0bae
@ -999,7 +999,7 @@ static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id)
|
|||||||
|
|
||||||
dev->virtbase = devm_ioremap(&adev->dev, adev->res.start,
|
dev->virtbase = devm_ioremap(&adev->dev, adev->res.start,
|
||||||
resource_size(&adev->res));
|
resource_size(&adev->res));
|
||||||
if (IS_ERR(dev->virtbase)) {
|
if (!dev->virtbase) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_no_mem;
|
goto err_no_mem;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user