mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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
This commit is contained in:
parent
4086d90cff
commit
6f6e0b217a
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue