From: Akinobu Mita Date: Wed, 26 Feb 2014 13:57:00 +0000 (+0900) Subject: [SCSI] scsi_debug: fix duplicate dif_errors increment X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c613d061ce01be1f4e195f4666d4a99e5284cb5d;p=linux-beck.git [SCSI] scsi_debug: fix duplicate dif_errors increment It is unnecessary to increase dif_errors in dif_verify(), because the caller will increment it when dif_verify() detects failure. This bug was introduced by commit beb40ea42bd6 ("[SCSI] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write") Signed-off-by: Akinobu Mita Acked-by: Martin K. Petersen Reviewed-by: Douglas Gilbert Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 9cd211ea4719..1a4288032110 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -1780,7 +1780,6 @@ static int dif_verify(struct sd_dif_tuple *sdt, const void *data, be32_to_cpu(sdt->ref_tag) != ei_lba) { pr_err("%s: REF check failed on sector %lu\n", __func__, (unsigned long)sector); - dif_errors++; return 0x03; } return 0;