staging: comedi: amplc_pci224: multiple assignments should be avoided
authorIan Abbott <abbotti@mev.co.uk>
Thu, 31 Jul 2014 13:47:41 +0000 (14:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Aug 2014 19:23:08 +0000 (12:23 -0700)
Fix checkpatch issue: "CHECK: multiple assignments should be avoided".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/amplc_pci224.c

index e34bc5e76aff46f064a25b2450d92421f49d82b6..8e5d94abacd434ff915f115a731f5974e5b041d8 100644 (file)
@@ -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++) {