From: Tejun Heo Date: Tue, 20 Mar 2007 15:07:18 +0000 (+0900) Subject: [SCSI] sd: fix return value of sd_sync_cache() X-Git-Tag: v2.6.22-rc1~1015^2~45 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3721050afc6cb6ddf6de0f782e2054ebcc225e9b;p=linux-2.6-omap-h63xx.git [SCSI] sd: fix return value of sd_sync_cache() sd_sync_cache() should return -errno on error, fix it. Signed-off-by: Tejun Heo Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 12e18bb5456..3dda77c31f5 100644 --- a/drivers/scsi/sd.c +++ b/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)