diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-01-23 07:58:27 +0100 |
---|---|---|
committer | Boris Brezillon <bbrezillon@kernel.org> | 2019-01-29 15:09:16 +0100 |
commit | 32937a82f36c7bbe08db4052de94bc7ade4e3c51 (patch) | |
tree | d392b8fedd848a767912859fe2bde3910ca83d6b /drivers/mtd/devices | |
parent | mtd: Implement mtd_{read,write}() as wrappers around mtd_{read,write}_oob() (diff) | |
download | linux-32937a82f36c7bbe08db4052de94bc7ade4e3c51.tar.xz linux-32937a82f36c7bbe08db4052de94bc7ade4e3c51.zip |
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: ae9d4934b2d7 ("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>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r-- | drivers/mtd/devices/docg3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c index 4c94fc096696..60ddc38a5431 100644 --- a/drivers/mtd/devices/docg3.c +++ b/drivers/mtd/devices/docg3.c @@ -1872,7 +1872,7 @@ nomem3: nomem2: kfree(docg3); nomem1: - return ERR_PTR(ret); + return ret ? ERR_PTR(ret) : NULL; } /** |