In lynxfb_pci_probe return -ENOMEM rather than -ENODEV in case allocation of sm750_dev fails. Signed-off-by: Mike Rapoport <mike.rapoport@xxxxxxxxx> --- drivers/staging/sm750fb/sm750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 44a1edc..744800a 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -1016,7 +1016,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, sm750_dev = kzalloc(sizeof(*sm750_dev), GFP_KERNEL); if (!sm750_dev) { pr_err("Could not allocate memory for share.\n"); - return -ENODEV; + return -ENOMEM; } sm750_dev->fbinfo[0] = sm750_dev->fbinfo[1] = NULL; -- 2.1.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel