Re: [PATCH] staging: comedi: usbduxfast: Improve unlocking of a mutex in usbduxfast_ai_insn_read()

2017-11-03 Thread SF Markus Elfring
>> @@ -838,6 +834,10 @@ static int usbduxfast_ai_insn_read(struct comedi_device >> *dev, >>   mutex_unlock(>mut); >>     return insn->n; > > Minor niggle: You could also remove that call to mutex_unlock() by replacing > the above three lines with: > > ret = insn->n; > > which will

Re: [PATCH] staging: comedi: usbduxfast: Improve unlocking of a mutex in usbduxfast_ai_insn_read()

2017-11-03 Thread SF Markus Elfring
>> @@ -838,6 +834,10 @@ static int usbduxfast_ai_insn_read(struct comedi_device >> *dev, >>   mutex_unlock(>mut); >>     return insn->n; > > Minor niggle: You could also remove that call to mutex_unlock() by replacing > the above three lines with: > > ret = insn->n; > > which will

Re: [PATCH] staging: comedi: usbduxfast: Improve unlocking of a mutex in usbduxfast_ai_insn_read()

2017-11-03 Thread Greg Kroah-Hartman
On Fri, Nov 03, 2017 at 02:00:18PM +, Ian Abbott wrote: > On 02/11/17 19:40, SF Markus Elfring wrote: > > From: Markus Elfring > > Date: Thu, 2 Nov 2017 20:30:31 +0100 > > > > * Add a jump target so that a call of the function "mutex_unlock" is stored > >

Re: [PATCH] staging: comedi: usbduxfast: Improve unlocking of a mutex in usbduxfast_ai_insn_read()

2017-11-03 Thread Greg Kroah-Hartman
On Fri, Nov 03, 2017 at 02:00:18PM +, Ian Abbott wrote: > On 02/11/17 19:40, SF Markus Elfring wrote: > > From: Markus Elfring > > Date: Thu, 2 Nov 2017 20:30:31 +0100 > > > > * Add a jump target so that a call of the function "mutex_unlock" is stored > >only twice in this function

Re: [PATCH] staging: comedi: usbduxfast: Improve unlocking of a mutex in usbduxfast_ai_insn_read()

2017-11-03 Thread Ian Abbott
On 02/11/17 19:40, SF Markus Elfring wrote: From: Markus Elfring Date: Thu, 2 Nov 2017 20:30:31 +0100 * Add a jump target so that a call of the function "mutex_unlock" is stored only twice in this function implementation. * Replace five calls by goto

Re: [PATCH] staging: comedi: usbduxfast: Improve unlocking of a mutex in usbduxfast_ai_insn_read()

2017-11-03 Thread Ian Abbott
On 02/11/17 19:40, SF Markus Elfring wrote: From: Markus Elfring Date: Thu, 2 Nov 2017 20:30:31 +0100 * Add a jump target so that a call of the function "mutex_unlock" is stored only twice in this function implementation. * Replace five calls by goto statements. This issue was detected by

[PATCH] staging: comedi: usbduxfast: Improve unlocking of a mutex in usbduxfast_ai_insn_read()

2017-11-02 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 2 Nov 2017 20:30:31 +0100 * Add a jump target so that a call of the function "mutex_unlock" is stored only twice in this function implementation. * Replace five calls by goto statements. This issue was detected by using the

[PATCH] staging: comedi: usbduxfast: Improve unlocking of a mutex in usbduxfast_ai_insn_read()

2017-11-02 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 2 Nov 2017 20:30:31 +0100 * Add a jump target so that a call of the function "mutex_unlock" is stored only twice in this function implementation. * Replace five calls by goto statements. This issue was detected by using the Coccinelle software. Signed-off-by: