Re: [PATCH] scsi/libiscsi.c: return -errno rather than errno

Previous thread: [PATCH] JFS: diAlloc() should return -EIO rather than EIO by Li Zefan on Tuesday, May 27, 2008 - 3:55 am. (2 messages)

Next thread: [PATCH] dvb-usb/gp8psk.c: return -errno rather than errno by Li Zefan on Tuesday, May 27, 2008 - 4:01 am. (3 messages)
To: <James.Bottomley@...>
Cc: <michaelc@...>, Andrew Morton <akpm@...>, LKML <linux-kernel@...>, <linux-scsi@...>
Date: Tuesday, May 27, 2008 - 3:58 am

iscsi_prep_scsi_cmd_pdu() returns EIO in a failing path,
but returns -errno in other paths.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
drivers/scsi/libiscsi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index b43bf1d..d380f46 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -307,7 +307,7 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_cmd_task *ctask)
hdr->hlength = hdrlength & 0xFF;

if (conn->session->tt->init_cmd_task(conn->ctask))
- return EIO;
+ return -EIO;

conn->scsicmd_pdus_cnt++;
debug_scsi("iscsi prep [%s cid %d sc %p cdb 0x%x itt 0x%x "
-- 1.5.4.rc3
--

To: Li Zefan <lizf@...>
Cc: <James.Bottomley@...>, Andrew Morton <akpm@...>, LKML <linux-kernel@...>, <linux-scsi@...>
Date: Tuesday, May 27, 2008 - 6:06 pm

Thanks for the patch. I fixed this in the patches I sent to James for
2.6.27 already.
--

Previous thread: [PATCH] JFS: diAlloc() should return -EIO rather than EIO by Li Zefan on Tuesday, May 27, 2008 - 3:55 am. (2 messages)

Next thread: [PATCH] dvb-usb/gp8psk.c: return -errno rather than errno by Li Zefan on Tuesday, May 27, 2008 - 4:01 am. (3 messages)