From: kbuild test robot <fengguang.wu@xxxxxxxxx> 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@xxxxxxxxxxxxxx <abhinavk@xxxxxxxxxxxxxx> Signed-off-by: kbuild test robot <fengguang.wu@xxxxxxxxx> Signed-off-by: Julia Lawall <julia.lawall@xxxxxxx> --- 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; }