summaryrefslogtreecommitdiff
path: root/drivers/s390
diff options
context:
space:
mode:
authorPeter Oberparleiter <oberpar@linux.vnet.ibm.com>2015-05-18 15:27:59 +0300
committerDavid S. Miller <davem@davemloft.net>2015-05-18 19:14:18 +0300
commit89a2a8e76b8193fe282c472f1da259e0075476f7 (patch)
treeeb82999f0d5a38e378a022c2d0dd651032d4d4f7 /drivers/s390
parentffb9525141bc2f16badef715bd0fabd0cd66450e (diff)
downloadlinux-89a2a8e76b8193fe282c472f1da259e0075476f7.tar.xz
s390/lcs: Fix null-pointer access in msg
An attempt to configure a CTC device as LCS results in the following error message: (null): Detecting a network adapter for LCS devices failed with rc=-5 (0xfffffffb) "(null)" results from access to &card->dev->dev in lcs_new_device() which is only initialized later in the function. Fix this by using &ccwgdev->dev instead which is initialized before lcs_new_device() is called. Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/net/lcs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 00b7d9c9fe48..2f5b518b0e78 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -2150,7 +2150,7 @@ lcs_new_device(struct ccwgroup_device *ccwgdev)
rc = lcs_detect(card);
if (rc) {
LCS_DBF_TEXT(2, setup, "dtctfail");
- dev_err(&card->dev->dev,
+ dev_err(&ccwgdev->dev,
"Detecting a network adapter for LCS devices"
" failed with rc=%d (0x%x)\n", rc, rc);
lcs_stopcard(card);