Skip to content

Commit

Permalink
net: atm: remove redundant null pointer check on dev->name
Browse files Browse the repository at this point in the history
dev->name is a char array of IFNAMSIZ elements, hence can never be
null, so the null pointer check is redundant. Remove it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Aug 19, 2016
1 parent e202d4c commit 0d135e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/atm/mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ static int mpoa_event_listener(struct notifier_block *mpoa_notifier,
if (!net_eq(dev_net(dev), &init_net))
return NOTIFY_DONE;

if (dev->name == NULL || strncmp(dev->name, "lec", 3))
if (strncmp(dev->name, "lec", 3))
return NOTIFY_DONE; /* we are only interested in lec:s */

switch (event) {
Expand Down

0 comments on commit 0d135e4

Please sign in to comment.