Explorar o código

[SCSI] sd: fix return value of sd_sync_cache()

sd_sync_cache() should return -errno on error, fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Tejun Heo %!s(int64=18) %!d(string=hai) anos
pai
achega
3721050afc
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      drivers/scsi/sd.c

+ 3 - 1
drivers/scsi/sd.c

@@ -766,7 +766,9 @@ static int sd_sync_cache(struct scsi_disk *sdkp)
 			sd_print_sense_hdr(sdkp, &sshdr);
 	}
 
-	return res;
+	if (res)
+		return -EIO;
+	return 0;
 }
 
 static int sd_issue_flush(struct device *dev, sector_t *error_sector)