Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32937a82 authored by YueHaibing's avatar YueHaibing Committed by Boris Brezillon
Browse files

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: ae9d4934 ("mtd: docg3: add multiple floor support")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarBoris Brezillon <bbrezillon@kernel.org>
parent 2431c4f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1872,7 +1872,7 @@ doc_probe_device(struct docg3_cascade *cascade, int floor, struct device *dev)
nomem2:
	kfree(docg3);
nomem1:
	return ERR_PTR(ret);
	return ret ? ERR_PTR(ret) : NULL;
}

/**