Commit 11b57faf authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

net: dsa: b53: remove redundant null check on dev

The pointer dev can never be null, the null check is redundant
and can be removed. Cleans up a static analysis warning that
pointer priv is dereferencing dev before dev is being null
checked.

Addresses-Coverity: ("Dereference before null check")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 848ca918
...@@ -632,8 +632,7 @@ static int b53_srab_remove(struct platform_device *pdev) ...@@ -632,8 +632,7 @@ static int b53_srab_remove(struct platform_device *pdev)
struct b53_srab_priv *priv = dev->priv; struct b53_srab_priv *priv = dev->priv;
b53_srab_intr_set(priv, false); b53_srab_intr_set(priv, false);
if (dev) b53_switch_remove(dev);
b53_switch_remove(dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment