Skip to contentSkip to conversation

Staging: Use x instead of x != NULL.

PATCH New Sandhya Bankar 1 participant 3 messages Sep 19, 2016 Staging

lore
Share & tools
lore
#0 lore raw

cover Staging: Use x instead of x != NULL.

Use x instead of x != NULL. This patch is found by checkpatch.

Sandhya Bankar (2):
Staging: rts5208: ms: Use x instead of x != NULL.
Staging: rts5208: rtsx: Use x instead of x != NULL.

 drivers/staging/rts5208/ms.c   |    2 +-
 drivers/staging/rts5208/rtsx.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
#1 lore raw

PATCH 1/2 Staging: rts5208: ms: Use x instead of x != NULL.

Use x instead of x != NULL. This patch was found by checkpatch.

---
 drivers/staging/rts5208/ms.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/rts5208/ms.c +1 -1
index f927ba6..6afddea 100644
@@ -4077,7 +4077,7 @@ void ms_free_l2p_tbl(struct rtsx_chip *chip)
 	struct ms_info *ms_card = &chip->ms_card;
 	int i = 0;
 
-	if (ms_card->segment != NULL) {
+	if (ms_card->segment) {
 		for (i = 0; i < ms_card->segment_cnt; i++) {
 			vfree(ms_card->segment[i].l2p_table);
 			ms_card->segment[i].l2p_table = NULL;
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 Staging: rts5208: rtsx: Use x instead of x != NULL.

In reply to Sandhya Bankar

Use x instead of x != NULL. This patch was found by checkpatch.

---
 drivers/staging/rts5208/rtsx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/rts5208/rtsx.c +1 -1
index d75fa8d..d7554f4 100644
@@ -131,7 +131,7 @@ static int queuecommand_lck(struct scsi_cmnd *srb,
 	struct rtsx_chip *chip = dev->chip;
 
 	/* check for state-transition errors */
-	if (chip->srb != NULL) {
+	if (chip->srb) {
 		dev_err(&dev->pci->dev, "Error: chip->srb = %p\n",
 			chip->srb);
 		return SCSI_MLQUEUE_HOST_BUSY;
Signature · 1 line
1.7.1