[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20150815163453.GA245639@ivytown2>
Date: Sun, 16 Aug 2015 00:34:53 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: Narsimhulu Musini <nmusini@...co.com>
Cc: kbuild-all@...org, James Bottomley <JBottomley@...n.com>,
Sesidhar Baddela <sebaddel@...co.com>,
Hannes Reinecke <hare@...e.de>, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] snic: fix simple_return.cocci warnings
drivers/scsi/snic/vnic_cq.c:46:1-4: WARNING: end returns can be simpified and declaration on line 34 can be dropped
Simplify a trivial if-return sequence. Possibly combine with a
preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci
CC: Narsimhulu Musini <nmusini@...co.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
vnic_cq.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
--- a/drivers/scsi/snic/vnic_cq.c
+++ b/drivers/scsi/snic/vnic_cq.c
@@ -31,8 +31,6 @@ void svnic_cq_free(struct vnic_cq *cq)
int svnic_cq_alloc(struct vnic_dev *vdev, struct vnic_cq *cq,
unsigned int index, unsigned int desc_count, unsigned int desc_size)
{
- int err;
-
cq->index = index;
cq->vdev = vdev;
@@ -43,11 +41,7 @@ int svnic_cq_alloc(struct vnic_dev *vdev
return -EINVAL;
}
- err = svnic_dev_alloc_desc_ring(vdev, &cq->ring, desc_count, desc_size);
- if (err)
- return err;
-
- return 0;
+ return svnic_dev_alloc_desc_ring(vdev, &cq->ring, desc_count, desc_size);
}
void svnic_cq_init(struct vnic_cq *cq, unsigned int flow_control_enable,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists