Skip to content

Commit 6f6abd3

Browse files
rjarzmiktomba
authored andcommitted
video: fbdev: pxafb: fix out of memory error path
As seen by Julia, the initial allocation memory is not checked anymore after commit "video: fbdev: pxafb: initial devicetree conversion". Introduce back the removed test. Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
1 parent caf0578 commit 6f6abd3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/video/fbdev/pxafb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,6 +2249,8 @@ static int pxafb_probe(struct platform_device *dev)
22492249
ret = -ENOMEM;
22502250
pdata = dev_get_platdata(&dev->dev);
22512251
inf = devm_kmalloc(&dev->dev, sizeof(*inf), GFP_KERNEL);
2252+
if (!inf)
2253+
goto failed;
22522254

22532255
if (pdata) {
22542256
*inf = *pdata;

0 commit comments

Comments
 (0)