Sergei Shtylyov d62668e1dd gpiolib: fix device_create() result check
In case of failure, device_create() returns not NULL but the error code.
The current code checks for non-NULL though which causes kernel oops in
sysfs_create_group() when device_create() fails.  Check for error using
IS_ERR() and propagate the error value using PTR_ERR() instead of fixed
-ENODEV code returned now...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-12 07:26:00 -08:00
..
2009-11-04 14:04:06 +01:00
2009-11-02 22:12:37 -08:00
2009-09-24 07:21:05 -07:00
2009-11-12 07:25:57 -08:00
2009-10-15 09:58:27 -06:00
2009-11-12 07:25:59 -08:00
2009-10-31 12:11:38 -07:00
2009-09-23 11:35:41 -04:00
2009-10-04 22:53:41 +02:00
2009-10-04 15:05:10 -07:00
2009-09-23 10:07:49 -07:00