aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rockchip/cdn-dp-core.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <[email protected]>2017-07-06 21:58:33 +0000
committerSean Paul <[email protected]>2017-07-10 18:13:00 +0000
commit6f6e0b217a93011f8e11b9a2d5521a08fcf36990 (patch)
treeb71e3e38c1c6272438190805a85a471f4f515ca7 /drivers/gpu/drm/rockchip/cdn-dp-core.c
parentdrm/atomic: Add missing drm_atomic_state_clear to atomic_remove_fb (diff)
downloadkernel-6f6e0b217a93011f8e11b9a2d5521a08fcf36990.tar.gz
kernel-6f6e0b217a93011f8e11b9a2d5521a08fcf36990.zip
drm/rockchip: fix NULL check on devm_kzalloc() return value
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
Diffstat (limited to 'drivers/gpu/drm/rockchip/cdn-dp-core.c')
-rw-r--r--drivers/gpu/drm/rockchip/cdn-dp-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index 14fa1f8351e8..9b0b0588bbed 100644
--- 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;