mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
staging: comedi: ni_mio_common: fix local var for 32-bit read
The local variable 'd' is used to read a 32-bit register. One branch of the code shifts the register value 16 bits to the right to get the high 16-bits. Change the type of the local variable so that this shift works correctly. Reported by: coverity 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>
This commit is contained in:
parent
ae2aef64fb
commit
0557344e21
@ -2108,7 +2108,7 @@ static int ni_ai_insn_read(struct comedi_device *dev,
|
||||
unsigned int mask = (s->maxdata + 1) >> 1;
|
||||
int i, n;
|
||||
unsigned signbits;
|
||||
unsigned short d;
|
||||
unsigned int d;
|
||||
unsigned long dl;
|
||||
|
||||
ni_load_channelgain_list(dev, s, 1, &insn->chanspec);
|
||||
|
Loading…
Reference in New Issue
Block a user