]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drm/rockchip: fix NULL check on devm_kzalloc() return value
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Thu, 6 Jul 2017 21:58:33 +0000 (16:58 -0500)
committerSean Paul <seanpaul@chromium.org>
Mon, 10 Jul 2017 18:13:00 +0000 (14:13 -0400)
commit6f6e0b217a93011f8e11b9a2d5521a08fcf36990
treeb71e3e38c1c6272438190805a85a471f4f515ca7
parent4086d90cffb8f48400d51fbab575fe50458512e3
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 <garsilva@embeddedor.com>
Acked-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170706215833.GA25411@embeddedgus
drivers/gpu/drm/rockchip/cdn-dp-core.c