[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <139cd66e-e8f8-0d18-a876-59e791bb8624@ti.com>
Date: Wed, 21 Aug 2019 18:02:07 +0300
From: Grygorii Strashko <grygorii.strashko@...com>
To: Antoine Tenart <antoine.tenart@...tlin.com>, <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <linux-omap@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <maxime.chevallier@...tlin.com>
Subject: Re: [PATCH net] net: cpsw: fix NULL pointer exception in the probe
error path
On 21/08/2019 17:41, Antoine Tenart wrote:
> 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@...tlin.com>
> Signed-off-by: Antoine Tenart <antoine.tenart@...tlin.com>
> ---
> drivers/net/ethernet/ti/cpsw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Thank you.
Reviewed-by: Grygorii Strashko <grygorii.strashko@...com>
--
Best regards,
grygorii
Powered by blists - more mailing lists