mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 00:10:09 +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
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue