From: Akinobu Mita Date: Wed, 26 Feb 2014 13:57:01 +0000 (+0900) Subject: [SCSI] scsi_debug: fix resp_xdwriteread() return value when running out of memory X-Git-Tag: v3.15-rc1~136^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5af0db96b7c219245f4985314e11c7e716e82ae;p=pandora-kernel.git [SCSI] scsi_debug: fix resp_xdwriteread() return value when running out of memory When resp_xdwriteread() can't allocate temporary buffer, it returns -1. But the return value is used as scsi status code and -1 is not interpreted as correct code. target_core_mod has similar xdwriteread emulation code. So this mimics what target_core_mod does for xdwriteread when running out of memory. Signed-off-by: Akinobu Mita Reviewed-by: Douglas Gilbert Reviewed-by: Martin K. Petersen Signed-off-by: James Bottomley --- Reading git-diff-tree failed