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

Configure Feed

Select the types of activity you want to include in your feed.

video: fbdev-MMP: Delete an error message for a failed memory allocation in two functions

Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Markus Elfring and committed by
Bartlomiej Zolnierkiewicz
e0e894f5 c24a5e93

+4 -7
+2 -3
drivers/video/fbdev/mmp/fb/mmpfb.c
··· 495 495 /* put videomode list to info structure */ 496 496 videomodes = kzalloc(sizeof(struct fb_videomode) * videomode_num, 497 497 GFP_KERNEL); 498 - if (!videomodes) { 499 - dev_err(fbi->dev, "can't malloc video modes\n"); 498 + if (!videomodes) 500 499 return -ENOMEM; 501 - } 500 + 502 501 for (i = 0; i < videomode_num; i++) 503 502 mmpmode_to_fbmode(&videomodes[i], &mmp_modes[i]); 504 503 fb_videomode_to_modelist(videomodes, videomode_num, &info->modelist);
+2 -4
drivers/video/fbdev/mmp/hw/mmp_ctrl.c
··· 407 407 408 408 /* init driver data */ 409 409 path_info = kzalloc(sizeof(struct mmp_path_info), GFP_KERNEL); 410 - if (!path_info) { 411 - dev_err(ctrl->dev, "%s: unable to alloc path_info for %s\n", 412 - __func__, config->name); 410 + if (!path_info) 413 411 return 0; 414 - } 412 + 415 413 path_info->name = config->name; 416 414 path_info->id = path_plat->id; 417 415 path_info->dev = ctrl->dev;