video: fbdev: don't print error message on framebuffer_alloc() failure
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 28 Jun 2019 10:30:08 +0000 (12:30 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 28 Jun 2019 10:30:08 +0000 (12:30 +0200)
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: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
42 files changed:
drivers/hid/hid-picolcd_fb.c
drivers/video/fbdev/amifb.c
drivers/video/fbdev/arkfb.c
drivers/video/fbdev/atmel_lcdfb.c
drivers/video/fbdev/aty/aty128fb.c
drivers/video/fbdev/aty/atyfb_base.c
drivers/video/fbdev/aty/radeon_base.c
drivers/video/fbdev/chipsfb.c
drivers/video/fbdev/cirrusfb.c
drivers/video/fbdev/da8xx-fb.c
drivers/video/fbdev/efifb.c
drivers/video/fbdev/grvga.c
drivers/video/fbdev/gxt4500.c
drivers/video/fbdev/hyperv_fb.c
drivers/video/fbdev/i740fb.c
drivers/video/fbdev/imsttfb.c
drivers/video/fbdev/intelfb/intelfbdrv.c
drivers/video/fbdev/jz4740_fb.c
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
drivers/video/fbdev/mbx/mbxfb.c
drivers/video/fbdev/omap/omapfb_main.c
drivers/video/fbdev/omap2/omapfb/omapfb-main.c
drivers/video/fbdev/platinumfb.c
drivers/video/fbdev/pmag-aa-fb.c
drivers/video/fbdev/pmag-ba-fb.c
drivers/video/fbdev/pmagb-b-fb.c
drivers/video/fbdev/pvr2fb.c
drivers/video/fbdev/riva/fbdev.c
drivers/video/fbdev/s3c-fb.c
drivers/video/fbdev/s3fb.c
drivers/video/fbdev/sh_mobile_lcdcfb.c
drivers/video/fbdev/sm501fb.c
drivers/video/fbdev/sm712fb.c
drivers/video/fbdev/smscufx.c
drivers/video/fbdev/ssd1307fb.c
drivers/video/fbdev/sunxvr1000.c
drivers/video/fbdev/sunxvr2500.c
drivers/video/fbdev/sunxvr500.c
drivers/video/fbdev/tgafb.c
drivers/video/fbdev/udlfb.c
drivers/video/fbdev/via/viafbdev.c
drivers/video/fbdev/vt8623fb.c

index 6897e14..e162a66 100644 (file)
@@ -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;
index 7584570..91ddc96 100644 (file)
@@ -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;
index 13ba371..f940e8b 100644 (file)
@@ -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);
index 930cc3f..5ff8e03 100644 (file)
@@ -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;
index b02e675..8504e19 100644 (file)
@@ -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;
index eebb62d..72bcfbe 100644 (file)
@@ -3550,10 +3550,9 @@ static int atyfb_pci_probe(struct pci_dev *pdev,
 
        /* Allocate framebuffer */
        info = framebuffer_alloc(sizeof(struct atyfb_par), &pdev->dev);
-       if (!info) {
-               PRINTKE("atyfb_pci_probe() can't alloc fb_info\n");
+       if (!info)
                return -ENOMEM;
-       }
+
        par = info->par;
        par->bus_type = PCI;
        info->fix = atyfb_fix;
@@ -3643,10 +3642,9 @@ static int __init atyfb_atari_probe(void)
                }
 
                info = framebuffer_alloc(sizeof(struct atyfb_par), NULL);
-               if (!info) {
-                       PRINTKE("atyfb_atari_probe() can't alloc fb_info\n");
+               if (!info)
                        return -ENOMEM;
-               }
+
                par = info->par;
 
                info->fix = atyfb_fix;
index e8594bb..6f891d8 100644 (file)
@@ -2294,8 +2294,6 @@ static int radeonfb_pci_register(struct pci_dev *pdev,
 
        info = framebuffer_alloc(sizeof(struct radeonfb_info), &pdev->dev);
        if (!info) {
-               printk (KERN_ERR "radeonfb (%s): could not allocate memory\n",
-                       pci_name(pdev));
                ret = -ENOMEM;
                goto err_disable;
        }
index ca549e1..f4dc320 100644 (file)
@@ -366,7 +366,6 @@ static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)
 
        p = framebuffer_alloc(0, &dp->dev);
        if (p == NULL) {
-               dev_err(&dp->dev, "Cannot allocate framebuffer structure\n");
                rc = -ENOMEM;
                goto err_disable;
        }
index b3be06d..e4ce566 100644 (file)
@@ -2093,7 +2093,6 @@ static int cirrusfb_pci_register(struct pci_dev *pdev,
 
        info = framebuffer_alloc(sizeof(struct cirrusfb_info), &pdev->dev);
        if (!info) {
-               printk(KERN_ERR "cirrusfb: could not allocate memory\n");
                ret = -ENOMEM;
                goto err_out;
        }
@@ -2206,10 +2205,8 @@ static int cirrusfb_zorro_register(struct zorro_dev *z,
        struct cirrusfb_info *cinfo;
 
        info = framebuffer_alloc(sizeof(struct cirrusfb_info), &z->dev);
-       if (!info) {
-               printk(KERN_ERR "cirrusfb: could not allocate memory\n");
+       if (!info)
                return -ENOMEM;
-       }
 
        zcl = (const struct zorrocl *)ent->driver_data;
        btype = zcl->type;
index 9ea817a..b1cf248 100644 (file)
@@ -1387,7 +1387,6 @@ static int fb_probe(struct platform_device *device)
        da8xx_fb_info = framebuffer_alloc(sizeof(struct da8xx_fb_par),
                                        &device->dev);
        if (!da8xx_fb_info) {
-               dev_dbg(&device->dev, "Memory allocation failed for fb_info\n");
                ret = -ENOMEM;
                goto err_pm_runtime_disable;
        }
index dfa8dd4..04a2266 100644 (file)
@@ -453,7 +453,6 @@ static int efifb_probe(struct platform_device *dev)
 
        info = framebuffer_alloc(sizeof(u32) * 16, &dev->dev);
        if (!info) {
-               pr_err("efifb: cannot allocate framebuffer\n");
                err = -ENOMEM;
                goto err_release_mem;
        }
index df5d546..d22e8b0 100644 (file)
@@ -336,10 +336,8 @@ static int grvga_probe(struct platform_device *dev)
        char *options = NULL, *mode_opt = NULL;
 
        info = framebuffer_alloc(sizeof(struct grvga_par), &dev->dev);
-       if (!info) {
-               dev_err(&dev->dev, "framebuffer_alloc failed\n");
+       if (!info)
                return -ENOMEM;
-       }
 
        /* Expecting: "grvga: modestring, [addr:<framebuffer physical address>], [size:<framebuffer size>]
         *
index 37527a1..c7502fd 100644 (file)
@@ -643,10 +643,9 @@ static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        info = framebuffer_alloc(sizeof(struct gxt4500_par), &pdev->dev);
-       if (!info) {
-               dev_err(&pdev->dev, "gxt4500: cannot alloc FB info record\n");
+       if (!info)
                goto err_free_fb;
-       }
+
        par = info->par;
        cardtype = ent->driver_data;
        par->refclk_ps = cardinfo[cardtype].refclk_ps;
index 00f5bdc..2dcb7c5 100644 (file)
@@ -762,10 +762,8 @@ static int hvfb_probe(struct hv_device *hdev,
        int ret;
 
        info = framebuffer_alloc(sizeof(struct hvfb_par), &hdev->device);
-       if (!info) {
-               pr_err("No memory for framebuffer info\n");
+       if (!info)
                return -ENOMEM;
-       }
 
        par = info->par;
        par->info = info;
index 24d3280..347cf8b 100644 (file)
@@ -1006,10 +1006,8 @@ static int i740fb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
        u8 *edid;
 
        info = framebuffer_alloc(sizeof(struct i740fb_par), &(dev->dev));
-       if (!info) {
-               dev_err(&(dev->dev), "cannot allocate framebuffer\n");
+       if (!info)
                return -ENOMEM;
-       }
 
        par = info->par;
        mutex_init(&par->open_lock);
index 35bba3c..58b01c7 100644 (file)
@@ -1477,11 +1477,8 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                printk(KERN_ERR "imsttfb: no OF node for pci device\n");
 
        info = framebuffer_alloc(sizeof(struct imstt_par), &pdev->dev);
-
-       if (!info) {
-               printk(KERN_ERR "imsttfb: Can't allocate memory\n");
+       if (!info)
                return -ENOMEM;
-       }
 
        par = info->par;
 
index 6bae2a7..a76c615 100644 (file)
@@ -491,10 +491,9 @@ static int intelfb_pci_register(struct pci_dev *pdev,
        }
 
        info = framebuffer_alloc(sizeof(struct intelfb_info), &pdev->dev);
-       if (!info) {
-               ERR_MSG("Could not allocate memory for intelfb_info.\n");
+       if (!info)
                return -ENOMEM;
-       }
+
        if (fb_alloc_cmap(&info->cmap, 256, 1) < 0) {
                ERR_MSG("Could not allocate cmap for intelfb_info.\n");
                goto err_out_cmap;
index 1f78b2b..0b6fa25 100644 (file)
@@ -528,10 +528,8 @@ static int jzfb_probe(struct platform_device *pdev)
        }
 
        fb = framebuffer_alloc(sizeof(struct jzfb), &pdev->dev);
-       if (!fb) {
-               dev_err(&pdev->dev, "Failed to allocate framebuffer device\n");
+       if (!fb)
                return -ENOMEM;
-       }
 
        fb->fbops = &jzfb_ops;
        fb->flags = FBINFO_DEFAULT;
index cd37252..ed6c978 100644 (file)
@@ -684,10 +684,8 @@ static int of_platform_mb862xx_probe(struct platform_device *ofdev)
        }
 
        info = framebuffer_alloc(sizeof(struct mb862xxfb_par), dev);
-       if (info == NULL) {
-               dev_err(dev, "cannot allocate framebuffer\n");
+       if (!info)
                return -ENOMEM;
-       }
 
        par = info->par;
        par->info = info;
@@ -1009,7 +1007,6 @@ static int mb862xx_pci_probe(struct pci_dev *pdev,
 
        info = framebuffer_alloc(sizeof(struct mb862xxfb_par), dev);
        if (!info) {
-               dev_err(dev, "framebuffer alloc failed\n");
                ret = -ENOMEM;
                goto dis_dev;
        }
index 6ded480..5093525 100644 (file)
@@ -899,10 +899,8 @@ static int mbxfb_probe(struct platform_device *dev)
        }
 
        fbi = framebuffer_alloc(sizeof(struct mbxfb_info), &dev->dev);
-       if (fbi == NULL) {
-               dev_err(&dev->dev, "framebuffer_alloc failed\n");
+       if (!fbi)
                return -ENOMEM;
-       }
 
        mfbi = fbi->par;
        fbi->pseudo_palette = mfbi->pseudo_palette;
index 406f972..90eca64 100644 (file)
@@ -1502,8 +1502,6 @@ static int planes_init(struct omapfb_device *fbdev)
                fbi = framebuffer_alloc(sizeof(struct omapfb_plane_struct),
                                        fbdev->dev);
                if (fbi == NULL) {
-                       dev_err(fbdev->dev,
-                               "unable to allocate memory for plane info\n");
                        planes_cleanup(fbdev);
                        return -ENOMEM;
                }
index b8b5b4a..a7dcf8b 100644 (file)
@@ -1892,12 +1892,8 @@ static int omapfb_create_framebuffers(struct omapfb2_device *fbdev)
 
                fbi = framebuffer_alloc(sizeof(struct omapfb_info),
                                fbdev->dev);
-
-               if (fbi == NULL) {
-                       dev_err(fbdev->dev,
-                               "unable to allocate memory for plane info\n");
+               if (!fbi)
                        return -ENOMEM;
-               }
 
                clear_fb_info(fbi);
 
index 76f2993..632b246 100644 (file)
@@ -538,10 +538,9 @@ static int platinumfb_probe(struct platform_device* odev)
        dev_info(&odev->dev, "Found Apple Platinum video hardware\n");
 
        info = framebuffer_alloc(sizeof(*pinfo), &odev->dev);
-       if (info == NULL) {
-               dev_err(&odev->dev, "Failed to allocate fbdev !\n");
+       if (!info)
                return -ENOMEM;
-       }
+
        pinfo = info->par;
 
        if (of_address_to_resource(dp, 0, &pinfo->rsrc_reg) ||
index ca7e939..d1e78ce 100644 (file)
@@ -165,10 +165,8 @@ static int pmagaafb_probe(struct device *dev)
        int err;
 
        info = framebuffer_alloc(sizeof(struct aafb_par), dev);
-       if (!info) {
-               printk(KERN_ERR "%s: Cannot allocate memory\n", dev_name(dev));
+       if (!info)
                return -ENOMEM;
-       }
 
        par = info->par;
        dev_set_drvdata(dev, info);
index 3b92494..56b912b 100644 (file)
@@ -150,10 +150,8 @@ static int pmagbafb_probe(struct device *dev)
        int err;
 
        info = framebuffer_alloc(sizeof(struct pmagbafb_par), dev);
-       if (!info) {
-               printk(KERN_ERR "%s: Cannot allocate memory\n", dev_name(dev));
+       if (!info)
                return -ENOMEM;
-       }
 
        par = info->par;
        dev_set_drvdata(dev, info);
index e58df36..2822b22 100644 (file)
@@ -257,10 +257,8 @@ static int pmagbbfb_probe(struct device *dev)
        int err;
 
        info = framebuffer_alloc(sizeof(struct pmagbbfb_par), dev);
-       if (!info) {
-               printk(KERN_ERR "%s: Cannot allocate memory\n", dev_name(dev));
+       if (!info)
                return -ENOMEM;
-       }
 
        par = info->par;
        dev_set_drvdata(dev, info);
index ad67f21..7ff4b6b 100644 (file)
@@ -1072,12 +1072,8 @@ static int __init pvr2fb_init(void)
 #endif
 
        fb_info = framebuffer_alloc(sizeof(struct pvr2fb_par), NULL);
-
-       if (!fb_info) {
-               printk(KERN_ERR "Failed to allocate memory for fb_info\n");
+       if (!fb_info)
                return -ENOMEM;
-       }
-
 
        currentpar = fb_info->par;
 
index cc242ba..ca593a3 100644 (file)
@@ -1902,7 +1902,6 @@ static int rivafb_probe(struct pci_dev *pd, const struct pci_device_id *ent)
 
        info = framebuffer_alloc(sizeof(struct riva_par), &pd->dev);
        if (!info) {
-               printk (KERN_ERR PFX "could not allocate memory\n");
                ret = -ENOMEM;
                goto err_ret;
        }
index 9ff7bf5..79cd173 100644 (file)
@@ -1189,10 +1189,8 @@ static int s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
 
        fbinfo = framebuffer_alloc(sizeof(struct s3c_fb_win) +
                                   palette_size * sizeof(u32), sfb->dev);
-       if (!fbinfo) {
-               dev_err(sfb->dev, "failed to allocate framebuffer\n");
+       if (!fbinfo)
                return -ENOMEM;
-       }
 
        windata = sfb->pdata->win[win_no];
        initmode = *sfb->pdata->vtiming;
index d63f23e..be16c34 100644 (file)
@@ -1128,10 +1128,8 @@ static int s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
        /* Allocate and fill driver data structure */
        info = framebuffer_alloc(sizeof(struct s3fb_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);
index b845442..ac0bcac 100644 (file)
@@ -1564,10 +1564,8 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl)
 
        /* Allocate and initialize the frame buffer device. */
        info = framebuffer_alloc(0, priv->dev);
-       if (info == NULL) {
-               dev_err(priv->dev, "unable to allocate fb_info\n");
+       if (!info)
                return -ENOMEM;
-       }
 
        ovl->info = info;
 
@@ -2049,10 +2047,8 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
         * list and allocate the color map.
         */
        info = framebuffer_alloc(0, priv->dev);
-       if (info == NULL) {
-               dev_err(priv->dev, "unable to allocate fb_info\n");
+       if (!info)
                return -ENOMEM;
-       }
 
        ch->info = info;
 
index dde52d0..285c5d6 100644 (file)
@@ -1868,10 +1868,8 @@ static int sm501fb_probe_one(struct sm501fb_info *info,
        }
 
        fbi = framebuffer_alloc(sizeof(struct sm501fb_par), info->dev);
-       if (fbi == NULL) {
-               dev_err(info->dev, "cannot allocate %s framebuffer\n", name);
+       if (!fbi)
                return -ENOMEM;
-       }
 
        par = fbi->par;
        par->info = info;
index f1dcc67..7b1b0d8 100644 (file)
@@ -1538,7 +1538,6 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
 
        info = framebuffer_alloc(sizeof(*sfb), &pdev->dev);
        if (!info) {
-               dev_err(&pdev->dev, "framebuffer_alloc failed\n");
                err = -ENOMEM;
                goto failed_free;
        }
index 8cd7892..0e0f5bb 100644 (file)
@@ -1650,10 +1650,8 @@ static int ufx_usb_probe(struct usb_interface *interface,
 
        /* allocates framebuffer driver structure, not framebuffer memory */
        info = framebuffer_alloc(0, &usbdev->dev);
-       if (!info) {
-               dev_err(dev->gdev, "framebuffer_alloc failed\n");
+       if (!info)
                goto e_nomem;
-       }
 
        dev->info = info;
        info->par = dev;
index 021b727..b674948 100644 (file)
@@ -555,10 +555,8 @@ static int ssd1307fb_probe(struct i2c_client *client,
        }
 
        info = framebuffer_alloc(sizeof(struct ssd1307fb_par), &client->dev);
-       if (!info) {
-               dev_err(&client->dev, "Couldn't allocate framebuffer.\n");
+       if (!info)
                return -ENOMEM;
-       }
 
        par = info->par;
        par->info = info;
index 8fe37c0..784c9bd 100644 (file)
@@ -121,7 +121,6 @@ static int gfb_probe(struct platform_device *op)
 
        info = framebuffer_alloc(sizeof(struct gfb_info), &op->dev);
        if (!info) {
-               printk(KERN_ERR "gfb: Cannot allocate fb_info\n");
                err = -ENOMEM;
                goto err_out;
        }
index 544465b..31683e5 100644 (file)
@@ -132,7 +132,6 @@ static int s3d_pci_register(struct pci_dev *pdev,
 
        info = framebuffer_alloc(sizeof(struct s3d_info), &pdev->dev);
        if (!info) {
-               printk(KERN_ERR "s3d: Cannot allocate fb_info\n");
                err = -ENOMEM;
                goto err_disable;
        }
index bc59593..d392976 100644 (file)
@@ -272,7 +272,6 @@ static int e3d_pci_register(struct pci_dev *pdev,
 
        info = framebuffer_alloc(sizeof(struct e3d_info), &pdev->dev);
        if (!info) {
-               printk(KERN_ERR "e3d: Cannot allocate fb_info\n");
                err = -ENOMEM;
                goto err_disable;
        }
index 65ba992..286b237 100644 (file)
@@ -1416,10 +1416,8 @@ static int tgafb_register(struct device *dev)
 
        /* Allocate the fb and par structures.  */
        info = framebuffer_alloc(sizeof(struct tga_par), dev);
-       if (!info) {
-               printk(KERN_ERR "tgafb: Cannot allocate memory\n");
+       if (!info)
                return -ENOMEM;
-       }
 
        par = info->par;
        dev_set_drvdata(dev, info);
index 00b9936..c328e82 100644 (file)
@@ -1686,10 +1686,8 @@ static int dlfb_usb_probe(struct usb_interface *intf,
 
        /* allocates framebuffer driver structure, not framebuffer memory */
        info = framebuffer_alloc(0, &dlfb->udev->dev);
-       if (!info) {
-               dev_err(&dlfb->udev->dev, "framebuffer_alloc failed\n");
+       if (!info)
                goto error;
-       }
 
        dlfb->info = info;
        info->par = dlfb;
index 8db5de1..f815f98 100644 (file)
@@ -1742,10 +1742,8 @@ int via_fb_pci_probe(struct viafb_dev *vdev)
        viafbinfo = framebuffer_alloc(viafb_par_length +
                ALIGN(sizeof(struct viafb_shared), BITS_PER_LONG/8),
                &vdev->pdev->dev);
-       if (!viafbinfo) {
-               printk(KERN_ERR"Could not allocate memory for viafb_info.\n");
+       if (!viafbinfo)
                return -ENOMEM;
-       }
 
        viaparinfo = (struct viafb_par *)viafbinfo->par;
        viaparinfo->shared = viafbinfo->par + viafb_par_length;
@@ -1820,8 +1818,6 @@ int via_fb_pci_probe(struct viafb_dev *vdev)
                viafbinfo1 = framebuffer_alloc(viafb_par_length,
                                &vdev->pdev->dev);
                if (!viafbinfo1) {
-                       printk(KERN_ERR
-                       "allocate the second framebuffer struct error\n");
                        rc = -ENOMEM;
                        goto out_fb_release;
                }
index 5cac871..c339a8f 100644 (file)
@@ -669,10 +669,8 @@ static int vt8623_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
        /* Allocate and fill driver data structure */
        info = framebuffer_alloc(sizeof(struct vt8623fb_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);