mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: octeon: Remove explicit NULL comparison
@ 2015-10-19 19:27 Muhammad Falak R Wani
  2015-10-19 19:27 ` [PATCH 2/2] " Muhammad Falak R Wani
  0 siblings, 1 reply; 2+ messages in thread
From: Muhammad Falak R Wani @ 2015-10-19 19:27 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, linux-kernel; +Cc: Muhammad Falak R Wani

Remove the explicit NULL comparison and rewrite in a compact form.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
 drivers/staging/octeon/ethernet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index fbbe866..f9ef555 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -634,7 +634,7 @@ static int cvm_oct_probe(struct platform_device *pdev)
 	}
 
 	cvm_oct_poll_queue = create_singlethread_workqueue("octeon-ethernet");
-	if (cvm_oct_poll_queue == NULL) {
+	if (!cvm_oct_poll_queue) {
 		pr_err("octeon-ethernet: Cannot create workqueue");
 		return -ENOMEM;
 	}
-- 
1.9.1


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

* [PATCH 2/2] staging: octeon: Remove explicit NULL comparison
  2015-10-19 19:27 [PATCH 1/2] staging: octeon: Remove explicit NULL comparison Muhammad Falak R Wani
@ 2015-10-19 19:27 ` Muhammad Falak R Wani
  0 siblings, 0 replies; 2+ messages in thread
From: Muhammad Falak R Wani @ 2015-10-19 19:27 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, linux-kernel; +Cc: Muhammad Falak R Wani

Remove the explicit NULL comparison and rewrite in a compact form.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
 drivers/staging/octeon/ethernet-tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 5b9ac1f..fdc36b1 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -563,7 +563,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
 	/* Get a work queue entry */
 	cvmx_wqe_t *work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL);
 
-	if (unlikely(work == NULL)) {
+	if (unlikely(!work)) {
 		printk_ratelimited("%s: Failed to allocate a work queue entry\n",
 				   dev->name);
 		priv->stats.tx_dropped++;
-- 
1.9.1


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

end of thread, other threads:[~2015-10-19 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-19 19:27 [PATCH 1/2] staging: octeon: Remove explicit NULL comparison Muhammad Falak R Wani
2015-10-19 19:27 ` [PATCH 2/2] " Muhammad Falak R Wani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®