diff options
author | Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> | 2013-12-07 04:13:03 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-06 15:22:05 -0500 |
commit | 59566b6e8cc8f8a05022e0f01a1b90974003f092 (patch) | |
tree | a5b939d0eea7adb6c907d5bbe354eb93b5487cb2 /drivers/vhost/scsi.c | |
parent | 941c22532f40dafa1320adbbc3776e7971bc0764 (diff) | |
download | linux-59566b6e8cc8f8a05022e0f01a1b90974003f092.tar.bz2 |
vhost: remove the dead branch
Since vhost_dev_init() forever return 0, some branches are never run,
therefore need to be removed.
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/vhost/scsi.c')
-rw-r--r-- | drivers/vhost/scsi.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index f175629513ed..1e4c75c5b36b 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -1417,18 +1417,13 @@ static int vhost_scsi_open(struct inode *inode, struct file *f) vqs[i] = &vs->vqs[i].vq; vs->vqs[i].vq.handle_kick = vhost_scsi_handle_kick; } - r = vhost_dev_init(&vs->dev, vqs, VHOST_SCSI_MAX_VQ); + vhost_dev_init(&vs->dev, vqs, VHOST_SCSI_MAX_VQ); tcm_vhost_init_inflight(vs, NULL); - if (r < 0) - goto err_init; - f->private_data = vs; return 0; -err_init: - kfree(vqs); err_vqs: vhost_scsi_free(vs); err_vs: |