From 59566b6e8cc8f8a05022e0f01a1b90974003f092 Mon Sep 17 00:00:00 2001 From: Zhi Yong Wu Date: Sat, 7 Dec 2013 04:13:03 +0800 Subject: 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 Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller --- drivers/vhost/scsi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/vhost/scsi.c') diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index f175629513e..1e4c75c5b36 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: -- cgit v1.2.3-70-g09d2