projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4086d90
)
drm/rockchip: fix NULL check on devm_kzalloc() return value
author
Gustavo A. R. Silva
<
[email protected]
>
Thu, 6 Jul 2017 21:58:33 +0000
(16:58 -0500)
committer
Sean Paul
<
[email protected]
>
Mon, 10 Jul 2017 18:13:00 +0000
(14:13 -0400)
The right variable to check here is port, not dp.
This issue was detected using Coccinelle and the following semantic patch:
@@
expression x;
identifier fld;
@@
* x = devm_kzalloc(...);
... when != x == NULL
x->fld
Signed-off-by: Gustavo A. R. Silva <
[email protected]
>
Acked-by: Mark Yao <
[email protected]
>
Signed-off-by: Sean Paul <
[email protected]
>
Link:
http://patchwork.freedesktop.org/patch/msgid/20170706215833.GA25411@embeddedgus
drivers/gpu/drm/rockchip/cdn-dp-core.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/rockchip/cdn-dp-core.c
b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index 14fa1f8351e8df22ab30560fbb6a1906841ba43d..9b0b0588bbedbc8becb6d94a6e38c177c3615092 100644
(file)
--- a/
drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/
drivers/gpu/drm/rockchip/cdn-dp-core.c
@@
-1195,7
+1195,7
@@
static int cdn_dp_probe(struct platform_device *pdev)
continue;
port = devm_kzalloc(dev, sizeof(*port), GFP_KERNEL);
- if (!
dp
)
+ if (!
port
)
return -ENOMEM;
port->extcon = extcon;