aboutsummaryrefslogtreecommitdiff
path: root/lib/test_overflow.c
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2019-10-24 11:32:18 +0100
committerDavid S. Miller <[email protected]>2019-10-28 13:38:06 -0700
commit556f124fb30621df3089d624ac57f13744712753 (patch)
treeaae66c0e0c71280765c3a66da28a8e6dab2152d5 /lib/test_overflow.c
parent5b7fe93db008ff013db24239136a25f3ac5142ac (diff)
net: dsa: fix dereference on ds->dev before null check error
Currently ds->dev is dereferenced on the assignments of pdata and np before ds->dev is null checked, hence there is a potential null pointer dereference on ds->dev. Fix this by assigning pdata and np after the ds->dev null pointer sanity check. Addresses-Coverity: ("Dereference before null check") Fixes: 7e99e3470172 ("net: dsa: remove dsa_switch_alloc helper") Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Reported-by: kbuild test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Reviewed-by: Vivien Didelot <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions