Commit 0adcdbcb authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

video: fbdev: don't print error message on framebuffer_alloc() failure



framebuffer_alloc() can fail only on kzalloc() memory allocation
failure and since kzalloc() will print error message in such case
we can omit printing extra error message in drivers (which BTW is
what the majority of framebuffer_alloc() users is doing already).

Cc: "Bruno Prémont" <bonbons@linux-vserver.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent 5f0e6ce1
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -512,10 +512,8 @@ int picolcd_init_framebuffer(struct picolcd_data *data)
			sizeof(struct fb_deferred_io) +
			sizeof(struct fb_deferred_io) +
			sizeof(struct picolcd_fb_data) +
			sizeof(struct picolcd_fb_data) +
			PICOLCDFB_SIZE, dev);
			PICOLCDFB_SIZE, dev);
	if (info == NULL) {
	if (!info)
		dev_err(dev, "failed to allocate a framebuffer\n");
		goto err_nomem;
		goto err_nomem;
	}


	info->fbdefio = info->par;
	info->fbdefio = info->par;
	*info->fbdefio = picolcd_fb_defio;
	*info->fbdefio = picolcd_fb_defio;
+1 −3
Original line number Original line Diff line number Diff line
@@ -3554,10 +3554,8 @@ static int __init amifb_probe(struct platform_device *pdev)
	custom.dmacon = DMAF_ALL | DMAF_MASTER;
	custom.dmacon = DMAF_ALL | DMAF_MASTER;


	info = framebuffer_alloc(sizeof(struct amifb_par), &pdev->dev);
	info = framebuffer_alloc(sizeof(struct amifb_par), &pdev->dev);
	if (!info) {
	if (!info)
		dev_err(&pdev->dev, "framebuffer_alloc failed\n");
		return -ENOMEM;
		return -ENOMEM;
	}


	strcpy(info->fix.id, "Amiga ");
	strcpy(info->fix.id, "Amiga ");
	info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
	info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+1 −3
Original line number Original line Diff line number Diff line
@@ -954,10 +954,8 @@ static int ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)


	/* Allocate and fill driver data structure */
	/* Allocate and fill driver data structure */
	info = framebuffer_alloc(sizeof(struct arkfb_info), &(dev->dev));
	info = framebuffer_alloc(sizeof(struct arkfb_info), &(dev->dev));
	if (! info) {
	if (!info)
		dev_err(&(dev->dev), "cannot allocate memory\n");
		return -ENOMEM;
		return -ENOMEM;
	}


	par = info->par;
	par = info->par;
	mutex_init(&par->open_lock);
	mutex_init(&par->open_lock);
+1 −3
Original line number Original line Diff line number Diff line
@@ -1053,10 +1053,8 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)


	ret = -ENOMEM;
	ret = -ENOMEM;
	info = framebuffer_alloc(sizeof(struct atmel_lcdfb_info), dev);
	info = framebuffer_alloc(sizeof(struct atmel_lcdfb_info), dev);
	if (!info) {
	if (!info)
		dev_err(dev, "cannot allocate memory\n");
		goto out;
		goto out;
	}


	sinfo = info->par;
	sinfo = info->par;
	sinfo->pdev = pdev;
	sinfo->pdev = pdev;
+2 −3
Original line number Original line Diff line number Diff line
@@ -2103,10 +2103,9 @@ static int aty128_probe(struct pci_dev *pdev, const struct pci_device_id *ent)


	/* We have the resources. Now virtualize them */
	/* We have the resources. Now virtualize them */
	info = framebuffer_alloc(sizeof(struct aty128fb_par), &pdev->dev);
	info = framebuffer_alloc(sizeof(struct aty128fb_par), &pdev->dev);
	if (info == NULL) {
	if (!info)
		printk(KERN_ERR "aty128fb: can't alloc fb_info_aty128\n");
		goto err_free_mmio;
		goto err_free_mmio;
	}

	par = info->par;
	par = info->par;


	info->pseudo_palette = par->pseudo_palette;
	info->pseudo_palette = par->pseudo_palette;
Loading