From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: linux-input@vger.kernel.org, Fabio Estevam <fabio.estevam@freescale.com>
Subject: Re: [PATCH] Input: imx_keypad - check for clk_prepare_enable() error
Date: Mon, 22 Jun 2015 09:23:03 -0700 [thread overview]
Message-ID: <20150622162303.GA2350@dtor-ws> (raw)
In-Reply-To: <1434945678-8027-1-git-send-email-festevam@gmail.com>
On Mon, Jun 22, 2015 at 01:01:18AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> clk_prepare_enable() may fail, so we should better check its return value
> and propagate it in the case of error.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Applied, thank you.
> ---
> drivers/input/keyboard/imx_keypad.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
> index 2e855e6..d2ea863 100644
> --- a/drivers/input/keyboard/imx_keypad.c
> +++ b/drivers/input/keyboard/imx_keypad.c
> @@ -506,7 +506,9 @@ static int imx_keypad_probe(struct platform_device *pdev)
> input_set_drvdata(input_dev, keypad);
>
> /* Ensure that the keypad will stay dormant until opened */
> - clk_prepare_enable(keypad->clk);
> + error = clk_prepare_enable(keypad->clk);
> + if (error)
> + return error;
> imx_keypad_inhibit(keypad);
> clk_disable_unprepare(keypad->clk);
>
> --
> 1.9.1
>
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
prev parent reply other threads:[~2015-06-22 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 4:01 [PATCH] Input: imx_keypad - check for clk_prepare_enable() error Fabio Estevam
2015-06-22 16:23 ` Dmitry Torokhov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150622162303.GA2350@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).