From: Ian Abbott Date: Thu, 31 Jul 2014 13:47:41 +0000 (+0100) Subject: staging: comedi: amplc_pci224: multiple assignments should be avoided X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ab2064a5cbd732f5228c718cb7f1afd72ea180da;p=linux-beck.git staging: comedi: amplc_pci224: multiple assignments should be avoided Fix checkpatch issue: "CHECK: multiple assignments should be avoided". Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c index e34bc5e76aff..8e5d94abacd4 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++) {