Re: [PATCH] iio/adc/palmas: Use common error handling code in palmas_gpadc_calibrate()

2017-10-27 Thread SF Markus Elfring
>> @@ -329,6 +325,10 @@ static int palmas_gpadc_calibrate(struct palmas_gpadc >> *adc, int adc_chan) >> >> scrub: >> return ret; >> + >> +report_failure: > > This makes for complex code flow where it is not needed. The shown code layout would be required in the suggested software design

Re: [PATCH] iio/adc/palmas: Use common error handling code in palmas_gpadc_calibrate()

2017-10-26 Thread Jonathan Cameron
On Thu, 26 Oct 2017 08:08:49 +0200 SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 26 Oct 2017 07:58:03 +0200 > > * Add a jump target so that a specific error message is stored only once > at the end of this function implementation. > > * Adjust condition checks. > > This issue

[PATCH] iio/adc/palmas: Use common error handling code in palmas_gpadc_calibrate()

2017-10-25 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 26 Oct 2017 07:58:03 +0200 * Add a jump target so that a specific error message is stored only once at the end of this function implementation. * Adjust condition checks. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring