]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
drm: xlnx: pl_disp: fix odd_ptr_err.cocci warnings
authorFengguang Wu <fengguang.wu@intel.com>
Tue, 10 Apr 2018 18:11:47 +0000 (11:11 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 2 May 2018 06:29:56 +0000 (08:29 +0200)
 PTR_ERR should normally access the value just tested by IS_ERR

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

Fixes: 742243a44a73 ("drm: xlnx: pl_disp: Use xlnx pipeline calls")
CC: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Saurabh Sengar <saurabhs@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/gpu/drm/xlnx/xlnx_pl_disp.c

index 66ee8477c26d65ef4cf0c080e12793a5ac2def70..58a42966a6b823e5b0945b8a68114f8ce94d156e 100644 (file)
@@ -473,7 +473,7 @@ static int xlnx_pl_disp_probe(struct platform_device *pdev)
 
        xlnx_pl_disp->master = xlnx_drm_pipeline_init(pdev);
        if (IS_ERR(xlnx_pl_disp->master)) {
-               ret = PTR_ERR(xlnx_pl_disp->dev);
+               ret = PTR_ERR(xlnx_pl_disp->master);
                dev_err(dev, "failed to initialize the drm pipeline\n");
                goto err_component;
        }