linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi/libiscsi.c: return -errno rather than errno
@ 2008-05-27  7:58 Li Zefan
  2008-05-27 22:06 ` Mike Christie
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zefan @ 2008-05-27  7:58 UTC (permalink / raw)
  To: James.Bottomley; +Cc: michaelc, Andrew Morton, LKML, linux-scsi

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi/libiscsi.c: return -errno rather than errno
  2008-05-27  7:58 [PATCH] scsi/libiscsi.c: return -errno rather than errno Li Zefan
@ 2008-05-27 22:06 ` Mike Christie
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Christie @ 2008-05-27 22:06 UTC (permalink / raw)
  To: Li Zefan; +Cc: James.Bottomley, Andrew Morton, LKML, linux-scsi

Li Zefan wrote:
> iscsi_prep_scsi_cmd_pdu() returns EIO in a failing path,
> but returns -errno in other paths.
> 

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-27 22:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-27  7:58 [PATCH] scsi/libiscsi.c: return -errno rather than errno Li Zefan
2008-05-27 22:06 ` Mike Christie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).