[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 <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Peter Oberparleiter
2006-02-01 03:06:35 -08:00
committed by Linus Torvalds
parent 3633b0475e
commit 600b5d163d
3 changed files with 5 additions and 3 deletions

View File

@@ -21,6 +21,7 @@
#include <linux/init.h>
#include <linux/console.h>
#include <linux/interrupt.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/bootmem.h>
@@ -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 *)