Skip to content

Commit

Permalink
video: clps711x-fb: release disp device node in probe()
Browse files Browse the repository at this point in the history
clps711x_fb_probe() increments refcnt of disp device node by
of_parse_phandle() and leaves it undecremented on both
successful and error paths.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
  • Loading branch information
Alexey Khoroshilov authored and Bartlomiej Zolnierkiewicz committed Dec 20, 2018
1 parent b4a1ed0 commit fdac751
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/video/fbdev/clps711x-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,17 @@ static int clps711x_fb_probe(struct platform_device *pdev)
}

ret = of_get_fb_videomode(disp, &cfb->mode, OF_USE_NATIVE_MODE);
if (ret)
if (ret) {
of_node_put(disp);
goto out_fb_release;
}

of_property_read_u32(disp, "ac-prescale", &cfb->ac_prescale);
cfb->cmap_invert = of_property_read_bool(disp, "cmap-invert");

ret = of_property_read_u32(disp, "bits-per-pixel",
&info->var.bits_per_pixel);
of_node_put(disp);
if (ret)
goto out_fb_release;

Expand Down

0 comments on commit fdac751

Please sign in to comment.