diff options
author | Antoine Tenart <antoine.tenart@bootlin.com> | 2019-08-21 10:41:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-21 16:58:15 -0400 |
commit | 2d683eaaeeb9d33d23674ae635e0ef1448523d18 (patch) | |
tree | d51f1f46b8cfb1483a8b813393f194fe251118e6 /scripts/gen_compile_commands.py | |
parent | 6e2866a9dfc63ca86290ad789961239de1b25a80 (diff) |
net: cpsw: fix NULL pointer exception in the probe error path
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>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'scripts/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions