[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <560E899B.8070603@zonque.org>
Date: Fri, 2 Oct 2015 15:41:47 +0200
From: Daniel Mack <daniel@...que.org>
To: Javier Martinez Canillas <javier@....samsung.com>,
linux-kernel@...r.kernel.org
Cc: Axel Lin <axel.lin@...ics.com>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Daniel Mack <linux@...que.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
linux-input@...r.kernel.org, Matt Ranostay <mranostay@...il.com>
Subject: Re: [PATCH 07/18] Input: cap11xx - simplify function return logic
On 10/02/2015 03:40 PM, Javier Martinez Canillas wrote:
> The invoked function already returns zero on success or a negative
> errno code so there is no need to open code the logic in the caller.
>
> This also fixes the following make coccicheck warning:
>
> drivers/input/keyboard/cap11xx.c:475:1-6: WARNING: end returns can be simplified
>
> Signed-off-by: Javier Martinez Canillas <javier@....samsung.com>
Acked-by: Daniel Mack <daniel@...que.org>
> ---
>
> drivers/input/keyboard/cap11xx.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/input/keyboard/cap11xx.c b/drivers/input/keyboard/cap11xx.c
> index 378db10001df..7240316ddfe3 100644
> --- a/drivers/input/keyboard/cap11xx.c
> +++ b/drivers/input/keyboard/cap11xx.c
> @@ -472,12 +472,8 @@ static int cap11xx_i2c_probe(struct i2c_client *i2c_client,
> return -ENXIO;
> }
>
> - error = devm_request_threaded_irq(dev, irq, NULL, cap11xx_thread_func,
> - IRQF_ONESHOT, dev_name(dev), priv);
> - if (error)
> - return error;
> -
> - return 0;
> + return devm_request_threaded_irq(dev, irq, NULL, cap11xx_thread_func,
> + IRQF_ONESHOT, dev_name(dev), priv);
> }
>
> static const struct of_device_id cap11xx_dt_ids[] = {
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists