From 600b5d163d7434332539cac7be00f649cbbfedcc Mon Sep 17 00:00:00 2001 From: Peter Oberparleiter Date: Wed, 1 Feb 2006 03:06:35 -0800 Subject: [PATCH] s390: ccw_device_probe_console return value The return code of ccw_device_probe_console() is not properly handled. It should only return a valid ccw device pointer or a error value converted by ERR_PTR. Fix the console driver code to check with IS_ERR instead against NULL. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/s390/char/con3215.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/s390/char/con3215.c') diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 1f06091..606f6ad 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -864,7 +865,7 @@ con3215_init(void) } cdev = ccw_device_probe_console(); - if (!cdev) + if (IS_ERR(cdev)) return -ENODEV; raw3215[0] = raw = (struct raw3215_info *) -- cgit v1.1