mtd: docg3: Fix passing zero to 'PTR_ERR' warning in doc_probe_device
Fix a static code checker warning:
drivers/mtd/devices/docg3.c:1875
doc_probe_device() warn: passing zero to 'ERR_PTR'
Fixes: ae9d4934b2
("mtd: docg3: add multiple floor support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
This commit is contained in:
parent
2431c4f5b4
commit
32937a82f3
|
@ -1872,7 +1872,7 @@ nomem3:
|
|||
nomem2:
|
||||
kfree(docg3);
|
||||
nomem1:
|
||||
return ERR_PTR(ret);
|
||||
return ret ? ERR_PTR(ret) : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue