Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: mx3fb: Use devm_kzalloc

Replace kzalloc by devm_kzalloc and remove the kfree() calls.

Signed-off-by: Denis Carikli <denis@eukrea.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Denis Carikli and committed by
Tomi Valkeinen
c58f6616 e3e11f51

+1 -3
+1 -3
drivers/video/fbdev/mx3fb.c
··· 1496 1496 if (!sdc_reg) 1497 1497 return -EINVAL; 1498 1498 1499 - mx3fb = kzalloc(sizeof(*mx3fb), GFP_KERNEL); 1499 + mx3fb = devm_kzalloc(&pdev->dev, sizeof(*mx3fb), GFP_KERNEL); 1500 1500 if (!mx3fb) 1501 1501 return -ENOMEM; 1502 1502 ··· 1542 1542 dmaengine_put(); 1543 1543 iounmap(mx3fb->reg_base); 1544 1544 eremap: 1545 - kfree(mx3fb); 1546 1545 dev_err(dev, "mx3fb: failed to register fb\n"); 1547 1546 return ret; 1548 1547 } ··· 1560 1561 dmaengine_put(); 1561 1562 1562 1563 iounmap(mx3fb->reg_base); 1563 - kfree(mx3fb); 1564 1564 return 0; 1565 1565 } 1566 1566