hw: megasas: return -1 when 'megasas_map_sgl' fails
commit5ecfbae201d68a2f13df233260c77b0a25d7cd35
authorLi Qiang <liq3ea@163.com>
Sat, 15 Aug 2020 14:19:39 +0000 (15 07:19 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 30 Sep 2020 17:09:20 +0000 (30 19:09 +0200)
tree6b7a804842be0d193af65a632a1bef7071ac357b
parentafff2db61f6ace9bb2c4d81c7c57601f5c009acd
hw: megasas: return -1 when 'megasas_map_sgl' fails

The caller of 'megasas_map_sgl' will only check if the return
is zero or not. If it return 0 it means success, as in the next
patch we will consider 'iov_count=0' is an error, so let's
return -1 to indicate a failure.

Signed-off-by: Li Qiang <liq3ea@163.com>
Message-Id: <20200815141940.44025-2-liq3ea@163.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/megasas.c