Skip to contentSkip to conversation

nsp32_restart_autoscsi(): remove error check

PATCH In review [email protected] 2 participants 2 messages Nov 21, 2007 – Nov 22, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/23 nsp32_restart_autoscsi(): remove error check

From: Adrian Bunk <[email protected]>

The Coverity checker noted that we'll anyway Oops later when we ran into this condition - and the error check didn't prevent that.

Considering that the error condition shouldn't be possible, and we are not able to handle it easily, this patch simply removes the pointless error check.

---

 drivers/scsi/nsp32.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/scsi/nsp32.c renamed from drivers/scsi/nsp32.c~nsp32_restart_autoscsi-remove-error-check +0 -4
diff -puN drivers/scsi/nsp32.c~nsp32_restart_autoscsi-remove-error-check drivers/scsi/nsp32.c
@@ -1906,10 +1906,6 @@ static void nsp32_restart_autoscsi(struc
 
 	nsp32_dbg(NSP32_DEBUG_RESTART, "enter");
 
-	if (data->cur_target == NULL || data->cur_lunt == NULL) {
-		nsp32_msg(KERN_ERR, "Target or Lun is invalid");
-	}
-
 	/*
 	 * set SYNC_REG
 	 * Don't set BM_START_ADR before setting this register.

_

#1 lore raw

AFAIR, this was the nsp32_msg() James wanted to keep, and the patch should therefore be dropped.

cu
Adrian

Quoted 32 lines · On Wed, Nov 21, 2007 at 03:12:15PM -0800, [email protected] wrote:

From: Adrian Bunk <[email protected]>

The Coverity checker noted that we'll anyway Oops later when we ran into this condition - and the error check didn't prevent that.

Considering that the error condition shouldn't be possible, and we are not able to handle it easily, this patch simply removes the pointless error check.

---

 drivers/scsi/nsp32.c |    4 ----
 1 file changed, 4 deletions(-)

diff -puN drivers/scsi/nsp32.c~nsp32_restart_autoscsi-remove-error-check drivers/scsi/nsp32.c

drivers/scsi/nsp32.c renamed from drivers/scsi/nsp32.c~nsp32_restart_autoscsi-remove-error-check +0 -4
@@ -1906,10 +1906,6 @@ static void nsp32_restart_autoscsi(struc
 
 	nsp32_dbg(NSP32_DEBUG_RESTART, "enter");
 
-	if (data->cur_target == NULL || data->cur_lunt == NULL) {
-		nsp32_msg(KERN_ERR, "Target or Lun is invalid");
-	}
-
 	/*
 	 * set SYNC_REG
 	 * Don't set BM_START_ADR before setting this register.

_