linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ursula Braun <ubraun@linux.vnet.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	ursula.braun@de.ibm.com, ubraun@linux.vnet.ibm.com,
	Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Subject: [PATCH net-next 8/8] s390/lcs: Fix null-pointer access in msg
Date: Mon, 18 May 2015 14:27:59 +0200	[thread overview]
Message-ID: <1431952079-6847-9-git-send-email-ubraun@linux.vnet.ibm.com> (raw)
In-Reply-To: <1431952079-6847-1-git-send-email-ubraun@linux.vnet.ibm.com>

From: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> 

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>
---
 drivers/s390/net/lcs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 00b7d9c..2f5b518 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);
-- 
2.3.7

  parent reply	other threads:[~2015-05-18 12:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 12:27 [PATCH net-next 0/8] s390: network patches for net-next Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 1/8] qeth: fix rx checksum offload handling Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 2/8] qeth: fix handling of IPA return codes Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 3/8] qeth: remove locks from sysfs _show Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 4/8] qeth: IFF_PROMISC flag to BRIDGE PORT mode Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 5/8] qeth: OSA version of SETBRIDGEPORT command Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 6/8] qeth: BRIDGEPORT "sanity check" Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 7/8] qeth: replace ENOSYS with EOPNOTSUPP Ursula Braun
2015-05-18 12:27 ` Ursula Braun [this message]
2015-05-18 16:16 ` [PATCH net-next 0/8] s390: network patches for net-next David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431952079-6847-9-git-send-email-ubraun@linux.vnet.ibm.com \
    --to=ubraun@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oberpar@linux.vnet.ibm.com \
    --cc=ursula.braun@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).