video: fbdev: intelfb: return -ENOMEM on framebuffer_alloc() failure
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 28 Jun 2019 10:30:06 +0000 (12:30 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 28 Jun 2019 10:30:06 +0000 (12:30 +0200)
Fix error code from -ENODEV to -ENOMEM.

Cc: Maik Broemme <mbroemme@libmpq.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/intelfb/intelfbdrv.c

index d7463a2a5d83f2f11ae00662aab3edc7b1682cba..6bae2a7f5e1c192f55bfbb45192c22da00d220d6 100644 (file)
@@ -493,7 +493,7 @@ 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");
-               return -ENODEV;
+               return -ENOMEM;
        }
        if (fb_alloc_cmap(&info->cmap, 256, 1) < 0) {
                ERR_MSG("Could not allocate cmap for intelfb_info.\n");