Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1209096 > unrolled thread

Re: [PATCH] gpio:Fix error handling in the function max732x_irq_bus_sync_unlock

Started byAlexandre Courbot <gnurou@gmail.com>
First post2015-08-18 09:40 +0200
Last post2015-08-18 09:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] gpio:Fix error handling in the function max732x_irq_bus_sync_unlock Alexandre Courbot <gnurou@gmail.com> - 2015-08-18 09:40 +0200

#1209096 — Re: [PATCH] gpio:Fix error handling in the function max732x_irq_bus_sync_unlock

FromAlexandre Courbot <gnurou@gmail.com>
Date2015-08-18 09:40 +0200
SubjectRe: [PATCH] gpio:Fix error handling in the function max732x_irq_bus_sync_unlock
Message-ID<pYJEZ-7X1-7@gated-at.bofh.it>
On Tue, Aug 18, 2015 at 3:37 AM, Nicholas Krause <xerofoify@gmail.com> wrote:
> This fixes error handling in the function max732x_irq_bus_sync_unlock
> by checking if the internal call in this function's while loop to the
> function max732x_gpio_direction_input failed by returning a error code
> and if so break out of this while immediately as we cannot continue
> after a failed call to this function before finally unlocking the
> locked mutex and returning to the caller of the function,
> max732x_irq_bus_sync_unlock.

Again a overlenghty one-line commit message.

The intent is also debattable. max732x_irq_bus_sync_unlock() returns
void, so we have to way to inform the caller that some failure
happened. In that case, isn't it better to keep doing the job as much
as we can? max732x_gpio_direction_input() already signals errors, so
all that we can do here is done already.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web