[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54acb3f4-8a0c-90ba-4267-f62e10baa252@users.sourceforge.net>
Date: Mon, 17 Apr 2017 17:30:12 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Jarod Wilson <jarod@...hat.com>,
Jisheng Zhang <jszhang@...vell.com>,
Mirko Lindner <mlindner@...vell.com>,
Philippe Reynes <tremyfr@...il.com>,
Russell King <rmk+kernel@...linux.org.uk>,
Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
Stephen Hemminger <stephen@...workplumber.org>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 20/25] net: mvpp2: Adjust a null pointer check in
mvpp2_egress_enable()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 17 Apr 2017 14:07:52 +0200
The script "checkpatch.pl" pointed information out like the following.
Comparison to NULL could be written "txq->descs".
Thus fix the affected source code place.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/net/ethernet/marvell/mvpp2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index 3bdd3f1fe34e..9b875d776b29 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -4415,7 +4415,7 @@ static void mvpp2_egress_enable(struct mvpp2_port *port)
for (queue = 0; queue < txq_number; queue++) {
struct mvpp2_tx_queue *txq = port->txqs[queue];
- if (txq->descs != NULL)
+ if (txq->descs)
qmap |= (1 << queue);
}
--
2.12.2
Powered by blists - more mailing lists