* [PATCH] net: atm: remove redundant null pointer check on dev->name
@ 2016-08-16 11:08 Colin King
2016-08-19 4:04 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2016-08-16 11:08 UTC (permalink / raw)
To: David S . Miller, netdev; +Cc: linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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>
---
net/atm/mpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 0e98222..3b3b1a2 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -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) {
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: atm: remove redundant null pointer check on dev->name
2016-08-16 11:08 [PATCH] net: atm: remove redundant null pointer check on dev->name Colin King
@ 2016-08-19 4:04 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-08-19 4:04 UTC (permalink / raw)
To: colin.king; +Cc: netdev, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Tue, 16 Aug 2016 12:08:42 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-19 4:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-16 11:08 [PATCH] net: atm: remove redundant null pointer check on dev->name Colin King
2016-08-19 4:04 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).