staging: comedi: ni_mio_common: multiple assignments should be avoided
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 14 Apr 2016 16:57:57 +0000 (09:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Apr 2016 05:17:28 +0000 (22:17 -0700)
Fix the checkpatch.pl issues.

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

index fa2aad4b3ec818930bf5e0c540a743d074c06efb..f5320f266c2362e559fc152967fb7f0dfa910e61 100644 (file)
@@ -4478,12 +4478,12 @@ static void caldac_setup(struct comedi_device *dev, struct comedi_subdevice *s)
        s->n_chan = n_chans;
 
        if (diffbits) {
-               unsigned int *maxdata_list;
+               unsigned int *maxdata_list = devpriv->caldac_maxdata_list;
 
                if (n_chans > MAX_N_CALDACS)
                        dev_err(dev->class_dev,
                                "BUG! MAX_N_CALDACS too small\n");
-               s->maxdata_list = maxdata_list = devpriv->caldac_maxdata_list;
+               s->maxdata_list = maxdata_list;
                chan = 0;
                for (i = 0; i < n_dacs; i++) {
                        type = board->caldac[i];