From: David Miller <davem@davemloft.net>
To: antoine.tenart@bootlin.com
Cc: grygorii.strashko@ti.com, netdev@vger.kernel.org,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
maxime.chevallier@bootlin.com
Subject: Re: [PATCH net] net: cpsw: fix NULL pointer exception in the probe error path
Date: Wed, 21 Aug 2019 14:00:14 -0700 (PDT) [thread overview]
Message-ID: <20190821.140014.255300007478960933.davem@davemloft.net> (raw)
In-Reply-To: <20190821144123.22248-1-antoine.tenart@bootlin.com>
From: Antoine Tenart <antoine.tenart@bootlin.com>
Date: Wed, 21 Aug 2019 16:41:23 +0200
> In certain cases when the probe function fails the error path calls
> cpsw_remove_dt() before calling platform_set_drvdata(). This is an
> issue as cpsw_remove_dt() uses platform_get_drvdata() to retrieve the
> cpsw_common data and leds to a NULL pointer exception. This patches
> fixes it by calling platform_set_drvdata() earlier in the probe.
>
> Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
> Reported-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Applied and queued up for -stable, thanks.
prev parent reply other threads:[~2019-08-21 21:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 14:41 [PATCH net] net: cpsw: fix NULL pointer exception in the probe error path Antoine Tenart
2019-08-21 15:02 ` Grygorii Strashko
2019-08-21 21:00 ` David Miller [this message]
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=20190821.140014.255300007478960933.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=antoine.tenart@bootlin.com \
--cc=grygorii.strashko@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
/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).