mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 10:43:43 +00:00
spi: sprd-adi: checking for NULL instead of IS_ERR()
devm_ioremap_resource() returns error pointers, it never returns NULL.
Fixes: 7e2903cb91
("spi: Add ADI driver for Spreadtrum platform")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
7e2903cb91
commit
04063a011f
@ -341,8 +341,8 @@ static int sprd_adi_probe(struct platform_device *pdev)
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
sadi->base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (!sadi->base) {
|
||||
ret = -ENOMEM;
|
||||
if (IS_ERR(sadi->base)) {
|
||||
ret = PTR_ERR(sadi->base);
|
||||
goto put_ctlr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user