[PATCH 04/18] staging: comedi: amplc_pci224: multiple assignments should be avoided

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix checkpatch issue: "CHECK: multiple assignments should be avoided".

Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
---
 drivers/staging/comedi/drivers/amplc_pci224.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c
index e34bc5e..8e5d94a 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -1192,11 +1192,12 @@ static int pci224_attach_common(struct comedi_device *dev,
 		/* PCI234 range options. */
 		const struct comedi_lrange **range_table_list;
 
-		s->range_table_list = range_table_list =
+		range_table_list =
 		    kmalloc(sizeof(struct comedi_lrange *) * s->n_chan,
 			    GFP_KERNEL);
-		if (!s->range_table_list)
+		if (!range_table_list)
 			return -ENOMEM;
+		s->range_table_list = range_table_list;
 
 		if (options) {
 			for (n = 2; n < 3 + s->n_chan; n++) {
-- 
2.0.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux