diff mbox series

drm/panel: fix odd_ptr_err.cocci warnings

Message ID alpine.DEB.2.21.1808180850440.2783@hadrien (mailing list archive)
State New, archived
Headers show
Series drm/panel: fix odd_ptr_err.cocci warnings | expand

Commit Message

Julia Lawall Aug. 18, 2018, 6:52 a.m. UTC
From: kbuild test robot <fengguang.wu@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@codeaurora.org <abhinavk@codeaurora.org>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@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(-)
diff mbox series

Patch

--- 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;
 	}