projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2431c4f
)
mtd: docg3: Fix passing zero to 'PTR_ERR' warning in doc_probe_device
author
YueHaibing
<yuehaibing@huawei.com>
Wed, 23 Jan 2019 06:58:27 +0000
(14:58 +0800)
committer
Boris Brezillon
<bbrezillon@kernel.org>
Tue, 29 Jan 2019 14:09:16 +0000
(15:09 +0100)
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>
drivers/mtd/devices/docg3.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mtd/devices/docg3.c
b/drivers/mtd/devices/docg3.c
index 4c94fc0966964b8c15aefc086cd5ecb8174f7d27..60ddc38a54314c36ea86a77fcf64be0b6b4b8acd 100644
(file)
--- 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
;
}
/**