Re: [PATCH 1/2] gpio: pca953x: reduce indentation level in pca953x_irq_setup()

2019-01-21 Thread Linus Walleij
On Wed, Jan 16, 2019 at 10:32 AM Thomas Petazzoni wrote: > The current design of pca953x_irq_setup() is: > > if (all conditions to support IRQ are met) { >lots of code to support IRQs, which goes to a serious indentation >level. > } > > return 0; > > It makes more sense to handle this

[PATCH 1/2] gpio: pca953x: reduce indentation level in pca953x_irq_setup()

2019-01-16 Thread Thomas Petazzoni
The current design of pca953x_irq_setup() is: if (all conditions to support IRQ are met) { lots of code to support IRQs, which goes to a serious indentation level. } return 0; It makes more sense to handle this like this: if (!all conditions to support IRQ are met) return 0; hand