[PATCH 2/2] SCSI: sd_resume_ don't leak SCSI error codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 563c176d617a56f390e89f1e9ded4946121ee63e Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oliver@xxxxxxxxxx>
Date: Fri, 8 Oct 2010 15:19:49 +0200
Subject: [PATCH 2/2] SCSI: sd_resume_ don't leak SCSI error codes

The generic layer expects generic error codes
not codes specific to SCSI

Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>
---
 drivers/scsi/sd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 5784c94..51b3302 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2558,7 +2558,7 @@ static int sd_resume(struct device *dev)
 
 done:
 	scsi_disk_put(sdkp);
-	return ret;
+	return ret ? -EIO : 0;
 }
 
 /**
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux