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 6897e14e7cb7b5262f79cc19e39dc8c209c83c32..e162a668fb7eab1320acbcf0d0786051ca1f11f5 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 7584570266940cf05f9b9a9947b131c2c3562339..91ddc960201465059ff08b1d773b1ee4f5468975 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 13ba371e70aa3630795164af9f6608c4fb90753e..f940e8b66b858aa026640d218b051c3d673893aa 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 930cc3f92e0185987554647c5b0bcfc0b8793a6b..5ff8e0320d95b885be49f9e381ee8055cb39a1ec 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 b02e67528a99ae22f61a9870465c6b17e3db202d..8504e19437ff0fbeb86365379515ae7b0005886d 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 eebb62d82a23f1621affb201a2e08afc00bc0a7f..72bcfbe42e4934b98e08a01c72c9a09377153388 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 e8594bbaea609ff41c296132297e250df5a07ae4..6f891d82eebe183a16b53f467a4b1337e4368dd5 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 ca549e1532e657ad98515033761adfc833a7a874..f4dc320dcafe29a3778f441eed9479921dee1fe8 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 b3be06dd290882e5c7d75db66977e73f6dcae128..e4ce5667b125152a8fb7f7c35407eb3c4c0063fb 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 9ea817ac1d816f5957b79b977d2547787aa4d309..b1cf248f3291856a465f66feefd519fc03c6268f 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 dfa8dd47d19d74ed8ba2da6957ca54edef969967..04a22663b4fbc8b9b42337dab5b6453f7f075410 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 df5d546e57e996a583a56d26fc31e02d7f8116af..d22e8b0c906d1f02ece9cf8b537a65ab61b98915 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 37527a10b95412a913a16475a4a9900ba3c9ccae..c7502fd8f447ac61457ff4853caa6b86997275ff 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 00f5bdcc6c6f3f29fef0f636415d10efa2632164..2dcb7c58b31e1d2e915a76b82757bec181bf96ed 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 24d3280a5b5f50a97266e64b8f2020faac25ff98..347cf8babc3e304f99f3df8e1b52eee4aedf5597 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 35bba3c2036d4d20c037cc6b786436646dcdcb7f..58b01c7d905600a97c230b5669d981f7d2e83fb8 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 6bae2a7f5e1c192f55bfbb45192c22da00d220d6..a76c61512c6088efa61f5aacdc3bdb4c0aa74896 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 1f78b2bfe566173442227f83efe307dcb0777ca5..0b6fa25f69242524e7134a5084ab65e8a2f43ed9 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 cd372527c9e4b750def373bc1dfa1192f5315744..ed6c978bab7da5ac73f0f0eb8894e210f6f210bc 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 6ded480a69b4ae20ca3bca0eea85d501ad2f3b38..50935252b50b6602a720460988cca0e71b06f4c3 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 406f972d2e42be852150dbfc7688320aae0b005b..90eca64e3144398a3c44472eb1a2c7e81d18d2b5 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 b8b5b4ac0e09cf2195212cda09e4b0f24f27cb5c..a7dcf8bc1d82174027cd4d51749797149e90480d 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 76f299375a00ea9e1deb290bea07e962ac8ab8ff..632b246ca35f6792304b4adbf037e6f081b82453 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 ca7e9390d1e7e56af5832af076fd0181ae482ea8..d1e78ce3a9c2d255dad9a07b493a221e1c99eb54 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 3b9249449ea613967f65912d86e9fb4f7644a5b8..56b912bb28de622bb8de31cb2b6c84206ade1b8d 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 e58df36233c4f35d49de997dc3a3878ec5130c9a..2822b2225924e29f8e38c16f9c88e9676c24cf6d 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 ad67f2135d5b62eb850021e34eb80c698380d602..7ff4b6b842824666556310a92da657eee6520721 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 cc242ba057d3ea0dcf613ea17246c3a2a683c127..ca593a3e41d74e18e0f37148d57a642e28ba2c2d 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 9ff7bf51a0507b01a12d832c4193c25f52de6807..79cd17305681326eb9d4c7916631e230304fb693 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 d63f23e26f7d7cc7130b9c0f311259805b0734cf..be16c349c10f827e0bc0d0f2caa16c294b082df0 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 b8454424910da4bb42bbfe2aa2c55cc2080fd3af..ac0bcac9a865d1b6485ce5f3429959706661dd0b 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 dde52d0274168dde174a3cafb16cb9ba532ecb97..285c5d6b733fae9bf199a133b589432793acbef5 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 f1dcc6766d1ef457d18c5e09e35521c896154162..7b1b0d8d27a7539f3e028a7c530f9c6a723ae983 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 8cd7892a0b0d7febfbbcd1341623f66debdb19f6..0e0f5bbfc5efc75c9903a3952fe20772bcfe118c 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 021b727e8b5c4929134e07b870ee0b932fceed8f..b674948e3bb8fcd13cacd9f127f5f8ba034db62c 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 8fe37c0ef2f504448bd162fc2feab2b3a857a432..784c9bd5d5021496321af97dbbcbe2ec62a4c436 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 544465ba1dc03e38df81bd9bfed440aea9f1c2f4..31683e5a8b79eb56a773949e74bd4ab6ae100e3d 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 bc595937df0810d4f7ea0ba6fedc149b2d737549..d392976126a6979cf1fedb205a76871c483cc350 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 65ba9921506e2b818f05fa4a308ac383f90c7ddf..286b2371c7dd3bb09d6c88dbc6788cee92f1614a 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 00b99363e528836c3280ba47fbc4790ccfa63574..c328e8265cb11e4ed5ecb4fdec829ffeff1df71f 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 8db5de13e2b7f425f924afe57381a45113f4056f..f815f98190bce5b2c2d457bce5ef48f224ca10de 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 5cac871db3ee2f7a58973964780df68a7ee4772f..c339a8fbad81f6c2a0bd1f14ac8b872946f1124e 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);