linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [net/ethernet] do_reset: remove dev null check
@ 2020-06-24  0:55 Gaurav Singh
  2020-06-24  3:18 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Gaurav Singh @ 2020-06-24  0:55 UTC (permalink / raw)
  To: gaurav1086, David S. Miller, Jakub Kicinski, Heiner Kallweit,
	Martin Habets, Michael S. Tsirkin, open list:NETWORKING DRIVERS,
	open list

dev cannot be NULL here since its already being accessed
before. Remove the redundant null check.

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
---
 drivers/net/ethernet/xircom/xirc2ps_cs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/xircom/xirc2ps_cs.c b/drivers/net/ethernet/xircom/xirc2ps_cs.c
index 480ab7251515..3e3883ad88b0 100644
--- a/drivers/net/ethernet/xircom/xirc2ps_cs.c
+++ b/drivers/net/ethernet/xircom/xirc2ps_cs.c
@@ -1473,7 +1473,7 @@ do_reset(struct net_device *dev, int full)
     unsigned int ioaddr = dev->base_addr;
     unsigned value;
 
-    pr_debug("%s: do_reset(%p,%d)\n", dev? dev->name:"eth?", dev, full);
+    pr_debug("%s: do_reset(%p,%d)\n", dev->name, dev, full);
 
     hardreset(dev);
     PutByte(XIRCREG_CR, SoftReset); /* set */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [net/ethernet] do_reset: remove dev null check
  2020-06-24  0:55 [PATCH] [net/ethernet] do_reset: remove dev null check Gaurav Singh
@ 2020-06-24  3:18 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-06-24  3:18 UTC (permalink / raw)
  To: gaurav1086; +Cc: kuba, hkallweit1, mhabets, mst, netdev, linux-kernel

From: Gaurav Singh <gaurav1086@gmail.com>
Date: Tue, 23 Jun 2020 20:55:45 -0400

> dev cannot be NULL here since its already being accessed
> before. Remove the redundant null check.
> 
> Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

I changed your Subject to be:

[PATCH net-next] xirc2ps_cs: remove dev null check from do_reset().

Since that is more properly formed.

Applied to net-next, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-24  3:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24  0:55 [PATCH] [net/ethernet] do_reset: remove dev null check Gaurav Singh
2020-06-24  3:18 ` 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).