USB: sd: sd_start_stop_device proper error codes
PATCH 1/3 USB: sd: sd_start_stop_device proper error codes
Quoted 1 line
From
8497ed3a68f19cfc8246c88716a5224cf24947b5Mon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Mon, 25 Oct 2010 11:45:59 +0200
Subject: [PATCH 1/3] USB: sd: sd_start_stop_device proper error codes
sd_start_stop_device leaks SCSI specific error codes to the generic driver code
Signed-off-by Oliver Neukum <[email protected]>
--- drivers/scsi/sd.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/scsi/sd.c +5 -1
@@ -2551,7 +2551,11 @@ static int sd_start_stop_device(struct scsi_disk *sdkp, int start)sd_print_sense_hdr (sdkp, &sshdr); } -return res; +/* SCSI error codes must not go to the generic layer */ +if (res) +return -EIO ; + +return 0 ; }/*
Signature · 1 line
1.7.1