Skip to content

Commit

Permalink
[SCSI] sd: fix return value of sd_sync_cache()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and James Bottomley committed Mar 20, 2007
1 parent ad8c31b commit 3721050
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3721050

Please sign in to comment.