aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char
diff options
context:
space:
mode:
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>2006-02-01 06:06:35 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:24 -0500
commit600b5d163d7434332539cac7be00f649cbbfedcc (patch)
tree3a999e6576a8593bf8b49d1e768f7e990eb78a3a /drivers/s390/char
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')
-rw-r--r--drivers/s390/char/con3215.c3
-rw-r--r--drivers/s390/char/con3270.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index 1f060914cfa4..606f6ad285a0 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -21,6 +21,7 @@
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/console.h> 22#include <linux/console.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/err.h>
24 25
25#include <linux/slab.h> 26#include <linux/slab.h>
26#include <linux/bootmem.h> 27#include <linux/bootmem.h>
@@ -864,7 +865,7 @@ con3215_init(void)
864 } 865 }
865 866
866 cdev = ccw_device_probe_console(); 867 cdev = ccw_device_probe_console();
867 if (!cdev) 868 if (IS_ERR(cdev))
868 return -ENODEV; 869 return -ENODEV;
869 870
870 raw3215[0] = raw = (struct raw3215_info *) 871 raw3215[0] = raw = (struct raw3215_info *)
diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c
index c570a9f6ce9c..ef607a1de55a 100644
--- a/drivers/s390/char/con3270.c
+++ b/drivers/s390/char/con3270.c
@@ -15,6 +15,7 @@
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/list.h> 16#include <linux/list.h>
17#include <linux/types.h> 17#include <linux/types.h>
18#include <linux/err.h>
18 19
19#include <asm/ccwdev.h> 20#include <asm/ccwdev.h>
20#include <asm/cio.h> 21#include <asm/cio.h>
@@ -597,7 +598,7 @@ con3270_init(void)
597 } 598 }
598 599
599 cdev = ccw_device_probe_console(); 600 cdev = ccw_device_probe_console();
600 if (!cdev) 601 if (IS_ERR(cdev))
601 return -ENODEV; 602 return -ENODEV;
602 rp = raw3270_setup_console(cdev); 603 rp = raw3270_setup_console(cdev);
603 if (IS_ERR(rp)) 604 if (IS_ERR(rp))