Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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 Diff line number Diff line
@@ -512,10 +512,8 @@ int picolcd_init_framebuffer(struct picolcd_data *data)
			sizeof(struct fb_deferred_io) +
			sizeof(struct picolcd_fb_data) +
			PICOLCDFB_SIZE, dev);
	if (info == NULL) {
		dev_err(dev, "failed to allocate a framebuffer\n");
	if (!info)
		goto err_nomem;
	}

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

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

	strcpy(info->fix.id, "Amiga ");
	info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+1 −3
Original line number 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 */
	info = framebuffer_alloc(sizeof(struct arkfb_info), &(dev->dev));
	if (! info) {
		dev_err(&(dev->dev), "cannot allocate memory\n");
	if (!info)
		return -ENOMEM;
	}

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

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

	sinfo = info->par;
	sinfo->pdev = pdev;
+2 −3
Original line number 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 */
	info = framebuffer_alloc(sizeof(struct aty128fb_par), &pdev->dev);
	if (info == NULL) {
		printk(KERN_ERR "aty128fb: can't alloc fb_info_aty128\n");
	if (!info)
		goto err_free_mmio;
	}

	par = info->par;

	info->pseudo_palette = par->pseudo_palette;
Loading