Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
[powerpc.git] / drivers / s390 / net / claw.c
index acd2a3f..95f4e10 100644 (file)
@@ -310,7 +310,7 @@ claw_probe(struct ccwgroup_device *cgdev)
         printk(KERN_INFO "claw: variable cgdev =\n");
         dumpit((char *)cgdev, sizeof(struct ccwgroup_device));
 #endif
-       privptr = kmalloc(sizeof(struct claw_privbk), GFP_KERNEL);
+       privptr = kzalloc(sizeof(struct claw_privbk), GFP_KERNEL);
        if (privptr == NULL) {
                probe_error(cgdev);
                put_device(&cgdev->dev);
@@ -319,7 +319,6 @@ claw_probe(struct ccwgroup_device *cgdev)
                CLAW_DBF_TEXT_(2,setup,"probex%d",-ENOMEM);
                return -ENOMEM;
        }
-       memset(privptr,0x00,sizeof(struct claw_privbk));
        privptr->p_mtc_envelope= kmalloc( MAX_ENVELOPE_SIZE, GFP_KERNEL);
        privptr->p_env = kmalloc(sizeof(struct claw_env), GFP_KERNEL);
         if ((privptr->p_mtc_envelope==NULL) || (privptr->p_env==NULL)) {
@@ -530,7 +529,7 @@ claw_open(struct net_device *dev)
         printk(KERN_INFO "%s:%s Enter  \n",dev->name,__FUNCTION__);
 #endif
        CLAW_DBF_TEXT(4,trace,"open");
-       if (!dev | (dev->name[0] == 0x00)) {
+       if (!dev || (dev->name[0] == 0x00)) {
                CLAW_DBF_TEXT(2,trace,"BadDev");
                printk(KERN_WARNING "claw: Bad device at open failing \n");
                return -ENODEV;