[PATCH] drm/panel: fix odd_ptr_err.cocci warnings

Julia Lawall julia.lawall at lip6.fr
Sat Aug 18 06:52:22 UTC 2018


From: kbuild test robot <fengguang.wu at intel.com>

 PTR_ERR should access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

Fixes: f84770f2bd15 ("drm/panel: Add support for Truly NT35597 panel driver")
CC: abhinavk at codeaurora.org <abhinavk at codeaurora.org>
Signed-off-by: kbuild test robot <fengguang.wu at intel.com>
Signed-off-by: Julia Lawall <julia.lawall at lip6.fr>
---

url:
https://github.com/0day-ci/linux/commits/Abhinav-Kumar/drm-panel-Add-support-for-Truly-NT35597-panel-driver/20180818-120729
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

 panel-truly-nt35597.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/panel/panel-truly-nt35597.c
+++ b/drivers/gpu/drm/panel/panel-truly-nt35597.c
@@ -624,7 +624,7 @@ static int truly_nt35597_probe(struct mi
 	dsi1_device = mipi_dsi_device_register_full(dsi1_host, &info);
 	if (IS_ERR(dsi1_device)) {
 		DRM_DEV_ERROR(dev, "failed to create dsi device\n");
-		ret = PTR_ERR(dsi);
+		ret = PTR_ERR(dsi1_device);
 		goto err_dsi_device;
 	}



More information about the dri-devel mailing list