Skip to contentSkip to conversation

staging: vt6655: replace NULL comparison with '!' operator

PATCH New Marko Stankovic 1 participant 2 messages May 22, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging: vt6655: replace NULL comparison with '!' operator

Fix comparison to NULL issues reported by checkpatch.pl

---
 drivers/staging/vt6655/device_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/vt6655/device_main.c +2 -2
index da0f71191009..1c652f0ff3ba 100644
@@ -157,7 +157,7 @@ static void vt6655_remove(struct pci_dev *pcid)
 {
 	struct vnt_private *priv = pci_get_drvdata(pcid);
 
-	if (priv == NULL)
+	if (!priv)
 		return;
 	device_free_info(priv);
 }
@@ -453,7 +453,7 @@ static bool device_init_rings(struct vnt_private *priv)
 				       priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc) +
 				       priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc),
 				       &priv->pool_dma, GFP_ATOMIC);
-	if (vir_pool == NULL) {
+	if (!vir_pool) {
 		dev_err(&priv->pcid->dev, "allocate desc dma memory failed\n");
 		return false;
 	}
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/2 staging: vt6655: remove unnecessary blank lines

Fix unnecessary blank lines issues reported by checkpatch.pl

---
 drivers/staging/vt6655/device_main.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/vt6655/device_main.c +0 -2
index 1c652f0ff3ba..78804eaec608 100644
@@ -1018,7 +1018,6 @@ static void vnt_interrupt_process(struct vnt_private *priv)
 			}
 
 			/* TODO: adhoc PS mode */
-
 		}
 
 		if (isr & ISR_BNTX) {
@@ -1702,7 +1701,6 @@ static int vt6655_suspend(struct pci_dev *pcid, pm_message_t state)
 
 static int vt6655_resume(struct pci_dev *pcid)
 {
-
 	pci_set_power_state(pcid, PCI_D0);
 	pci_enable_wake(pcid, PCI_D0, 0);
 	pci_restore_state(pcid);
Signature · 1 line
2.11.0