Skip to contentSkip to conversation

isdn: icn: NULL dereference printing error message

PATCH Applied Dan Carpenter 2 participants 2 messages Nov 7, 2013 – Nov 8, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 isdn: icn: NULL dereference printing error message

"card2" is NULL here so I have changed it to use "id2" instead of "card2->interface.id".

drivers/isdn/icn/icn.c +1 -2
index e74df7c..53d487f 100644
@@ -1580,8 +1580,7 @@ icn_addcard(int port, char *id1, char *id2)
 	}
 	if (!(card2 = icn_initcard(port, id2))) {
 		printk(KERN_INFO
-		       "icn: (%s) half ICN-4B, port 0x%x added\n",
-		       card2->interface.id, port);
+		       "icn: (%s) half ICN-4B, port 0x%x added\n", id2, port);
 		return 0;
 	}
 	card->doubleS0 = 1;