From: Roland Dreier Date: Tue, 14 Oct 2014 21:16:24 +0000 (-0700) Subject: target: Don't call TFO->write_pending if data_length == 0 X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~89^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=885e7b0e181c14e4d0ddd26c688bad2b84c1ada9;p=pandora-kernel.git target: Don't call TFO->write_pending if data_length == 0 If an initiator sends a zero-length command (e.g. TEST UNIT READY) but sets the transfer direction in the transport layer to indicate a data-out phase, we still shouldn't try to transfer data. At best it's a NOP, and depending on the transport, we might crash on an uninitialized sg list. Reported-by: Craig Watson Signed-off-by: Roland Dreier Cc: # 3.1 Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed