diff options
author | Tejun Heo <htejun@gmail.com> | 2007-03-20 11:07:18 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-03-20 12:33:32 -0400 |
commit | 3721050afc6cb6ddf6de0f782e2054ebcc225e9b (patch) | |
tree | 107f2b72a66674dc8769689335a248954bc8b8f5 /drivers/scsi/sd.c | |
parent | ad8c31bb69d60c0c6bc6431bccdf67e5a96c0d31 (diff) |
[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>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 12e18bb5456a..3dda77c31f50 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -766,7 +766,9 @@ static int sd_sync_cache(struct scsi_disk *sdkp) | |||
766 | sd_print_sense_hdr(sdkp, &sshdr); | 766 | sd_print_sense_hdr(sdkp, &sshdr); |
767 | } | 767 | } |
768 | 768 | ||
769 | return res; | 769 | if (res) |
770 | return -EIO; | ||
771 | return 0; | ||
770 | } | 772 | } |
771 | 773 | ||
772 | static int sd_issue_flush(struct device *dev, sector_t *error_sector) | 774 | static int sd_issue_flush(struct device *dev, sector_t *error_sector) |