When retry encountered, the count of retries is computed incorrectly, since it is one less. And a typo is also cleaned. Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx> --- --- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c 2010-11-01 19:54:12.000000000 +0800 +++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c 2010-11-17 20:57:58.000000000 +0800 @@ -216,7 +216,7 @@ static void start_stop_endio(struct requ err = start_done(h->sdev, h->sense); if (err == SCSI_DH_RETRY) { err = SCSI_DH_IO; - if (--h->retry_cnt) { + if (h->retry_cnt--) { blk_put_request(req); err = hp_sw_start_stop(h); if (err == SCSI_DH_OK) @@ -343,7 +343,7 @@ static int hp_sw_bus_attach(struct scsi_ if (!scsi_dh_data) { sdev_printk(KERN_ERR, sdev, "%s: Attach Failed\n", HP_SW_NAME); - return 0; + return -ENOMEM; } scsi_dh_data->scsi_dh = &hp_sw_dh; -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html