[PATCH] hwrng: fix geode probe error unwind
[powerpc.git] / drivers / s390 / char / con3215.c
index 1f06091..2fa566f 100644 (file)
@@ -11,7 +11,6 @@
  *            Dan Morrison, IBM Corporation (dmorriso@cse.buffalo.edu)
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kdev_t.h>
@@ -21,6 +20,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>
@@ -693,7 +693,7 @@ raw3215_probe (struct ccw_device *cdev)
                                       GFP_KERNEL|GFP_DMA);
        if (raw->buffer == NULL) {
                spin_lock(&raw3215_device_lock);
-               raw3215[line] = 0;
+               raw3215[line] = NULL;
                spin_unlock(&raw3215_device_lock);
                kfree(raw);
                return -ENOMEM;
@@ -864,7 +864,7 @@ con3215_init(void)
        }
 
        cdev = ccw_device_probe_console();
-       if (!cdev)
+       if (IS_ERR(cdev))
                return -ENODEV;
 
        raw3215[0] = raw = (struct raw3215_info *)