aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/char/con3270.c
diff options
context:
space:
mode:
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>2006-02-01 03:06:35 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 08:53:24 -0800
commit600b5d163d7434332539cac7be00f649cbbfedcc (patch)
tree3a999e6576a8593bf8b49d1e768f7e990eb78a3a /drivers/s390/char/con3270.c
parent3633b0475eb269dcb85923b23b321505f06b9488 (diff)
[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>
Diffstat (limited to 'drivers/s390/char/con3270.c')
-rw-r--r--drivers/s390/char/con3270.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c
index c570a9f6ce9..ef607a1de55 100644
--- a/drivers/s390/char/con3270.c
+++ b/drivers/s390/char/con3270.c
@@ -15,6 +15,7 @@
#include <linux/interrupt.h>
#include <linux/list.h>
#include <linux/types.h>
+#include <linux/err.h>
#include <asm/ccwdev.h>
#include <asm/cio.h>
@@ -597,7 +598,7 @@ con3270_init(void)
}
cdev = ccw_device_probe_console();
- if (!cdev)
+ if (IS_ERR(cdev))
return -ENODEV;
rp = raw3270_setup_console(cdev);
if (IS_ERR(rp))