path: root/drivers/video
diff options
authorYueHaibing <yuehaibing@huawei.com>2018-12-20 18:13:08 (GMT)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-12-20 18:13:08 (GMT)
commit2607391882fca37463187e7f2a9c76dec286947e (patch)
tree0e433a3d9cadb0ac63ac42cb885167b6a419e812 /drivers/video
parentf75df8d4b4fabfad7e3cba2debfad12741c6fde7 (diff)
video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data"
'info->modes' got allocated with devm_kcalloc in of_get_pxafb_display. This gives this error message: ./drivers/video/fbdev/pxafb.c:2238:2-7: WARNING: invalid free of devm_ allocated data Fixes: c8f96304ec8b4 ("video: fbdev: pxafb: switch to devm_* API") Cc: stable@kernel.org [v4.19+] Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Daniel Mack <daniel@zonque.org> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video')
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index bbed039..d59c8a5 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -2234,10 +2234,8 @@ static struct pxafb_mach_info *of_pxafb_of_mach_info(struct device *dev)
if (!info)
return ERR_PTR(-ENOMEM);
ret = of_get_pxafb_mode_info(dev, info);
- if (ret) {
- kfree(info->modes);
+ if (ret)
return ERR_PTR(ret);
- }
* On purpose, neither lccrX registers nor video memory size can be

Privacy Policy