Skip to contentSkip to conversation

drm/rockchip: cdn-dp: fix return value check in cdn_dp_probe()

PATCH New Wei Yongjun 1 participant 1 message Apr 25, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/rockchip: cdn-dp: fix return value check in cdn_dp_probe()

From: Wei Yongjun <[email protected]>

Fix the retrn value check which testing the wrong variable in cdn_dp_probe().

Fixes 1a0f7ed3abe2 ("drm/rockchip: cdn-dp: add cdn DP support for rk3399")
---
 drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/rockchip/cdn-dp-core.c +1 -1
index 9ab67a6..6a4a113 100644
@@ -1198,7 +1198,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;