RE: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-14 Thread Hartley Sweeten
On Friday, February 14, 2014 4:50 AM, Ian Abbott wrote: > On 2014-02-13 18:25, Hartley Sweeten wrote: >> On Wednesday, February 12, 2014 8:29 PM, Chase Southwood wrote: >>> In this if-else conditional statement, if (chan < 16), but >>> (data[0] == INSN_CONFIG_DIO_QUERY), the function does not

Re: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-14 Thread Ian Abbott
On 2014-02-13 10:08, Ian Abbott wrote: On 2014-02-13 03:29, Chase Southwood wrote: In this if-else conditional statement, if (chan < 16), but (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early, but the else-branch does not get executed either. As a result, mask would be

Re: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-14 Thread Ian Abbott
On 2014-02-13 18:25, Hartley Sweeten wrote: On Wednesday, February 12, 2014 8:29 PM, Chase Southwood wrote: In this if-else conditional statement, if (chan < 16), but (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early, but the else-branch does not get executed either. As a

Re: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-14 Thread Ian Abbott
On 2014-02-13 18:25, Hartley Sweeten wrote: On Wednesday, February 12, 2014 8:29 PM, Chase Southwood wrote: In this if-else conditional statement, if (chan 16), but (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early, but the else-branch does not get executed either. As a

Re: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-14 Thread Ian Abbott
On 2014-02-13 10:08, Ian Abbott wrote: On 2014-02-13 03:29, Chase Southwood wrote: In this if-else conditional statement, if (chan 16), but (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early, but the else-branch does not get executed either. As a result, mask would be used

RE: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-14 Thread Hartley Sweeten
On Friday, February 14, 2014 4:50 AM, Ian Abbott wrote: On 2014-02-13 18:25, Hartley Sweeten wrote: On Wednesday, February 12, 2014 8:29 PM, Chase Southwood wrote: In this if-else conditional statement, if (chan 16), but (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early,

RE: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-13 Thread Hartley Sweeten
On Wednesday, February 12, 2014 8:29 PM, Chase Southwood wrote: > In this if-else conditional statement, if (chan < 16), but > (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early, > but the else-branch does not get executed either. As a result, mask > would be used

Re: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-13 Thread Ian Abbott
On 2014-02-13 03:29, Chase Southwood wrote: In this if-else conditional statement, if (chan < 16), but (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early, but the else-branch does not get executed either. As a result, mask would be used uninitialized in the next line. What

Re: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-13 Thread Ian Abbott
On 2014-02-13 03:29, Chase Southwood wrote: In this if-else conditional statement, if (chan 16), but (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early, but the else-branch does not get executed either. As a result, mask would be used uninitialized in the next line. What

RE: [PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-13 Thread Hartley Sweeten
On Wednesday, February 12, 2014 8:29 PM, Chase Southwood wrote: In this if-else conditional statement, if (chan 16), but (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early, but the else-branch does not get executed either. As a result, mask would be used uninitialized in

[PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-12 Thread Chase Southwood
In this if-else conditional statement, if (chan < 16), but (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early, but the else-branch does not get executed either. As a result, mask would be used uninitialized in the next line. What we want here is if (chan < 16) and (data[0] !=

[PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-12 Thread Chase Southwood
In this if-else conditional statement, if (chan 16), but (data[0] == INSN_CONFIG_DIO_QUERY), the function does not return early, but the else-branch does not get executed either. As a result, mask would be used uninitialized in the next line. What we want here is if (chan 16) and (data[0] !=