scsi: clean up error handling in scsi_init_io
authorChristoph Hellwig <hch@lst.de>
Fri, 9 Nov 2018 13:42:38 +0000 (14:42 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 10 Nov 2018 02:17:14 +0000 (19:17 -0700)
commit14784565f740e862adae4b1d7c91f51b4038c4f5
treea7997ce39a5ad73e5d5ce3526511a43df801bb33
parent785ba83b4f3e4fde236f03205dd1cd98fd6a5255
scsi: clean up error handling in scsi_init_io

There is no need to call scsi_mq_free_sgtables until we have actually
allocated sgtables.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/scsi_lib.c