All of lore.kernel.org
 help / color / mirror / Atom feed
* [ patch -mm1 02/11 ] gpio-patchset-fixups: ENOMEM on device_add failure
@ 2006-06-22 18:50 Jim Cromie
  0 siblings, 0 replies; only message in thread
From: Jim Cromie @ 2006-06-22 18:50 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux kernel


If platform_device_alloc fails, return -ENOMEM, not ENODEV.

Signed-off-by:   Jim Cromie <jim.cromie@gmail.com>


diff -ruNp -X dontdiff -X exclude-diffs aa-1/drivers/char/scx200_gpio.c aa-2/drivers/char/scx200_gpio.c
--- aa-1/drivers/char/scx200_gpio.c	2006-06-22 09:29:24.000000000 -0600
+++ aa-2/drivers/char/scx200_gpio.c	2006-06-22 09:43:16.000000000 -0600
@@ -87,7 +87,7 @@ static int __init scx200_gpio_init(void)
 	/* support dev_dbg() with pdev->dev */
 	pdev = platform_device_alloc(DEVNAME, 0);
 	if (!pdev)
-		return -ENODEV;
+		return -ENOMEM;
 
 	rc = platform_device_add(pdev);
 	if (rc)



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-22 18:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22 18:50 [ patch -mm1 02/11 ] gpio-patchset-fixups: ENOMEM on device_add failure Jim Cromie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.