From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 3/3] smiapp: Return correct return value in smiapp_registered()
Date: Fri, 09 May 2014 14:17:24 +0200 [thread overview]
Message-ID: <6542492.1vSdmarlZg@avalon> (raw)
In-Reply-To: <1399163517-5220-4-git-send-email-sakari.ailus@iki.fi>
Hi Sakari,
Thank you for the patch.
On Sunday 04 May 2014 03:31:57 Sakari Ailus wrote:
> Prepare for supporting systems using the Device tree. Should the resources
> not be available at the time of driver probe(), the EPROBE_DEFER error code
> must be also returned from its probe function.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/media/i2c/smiapp/smiapp-core.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/media/i2c/smiapp/smiapp-core.c
> b/drivers/media/i2c/smiapp/smiapp-core.c index e4037c8..3c7be76 100644
> --- a/drivers/media/i2c/smiapp/smiapp-core.c
> +++ b/drivers/media/i2c/smiapp/smiapp-core.c
> @@ -2358,14 +2358,14 @@ static int smiapp_registered(struct v4l2_subdev
> *subdev) sensor->vana = devm_regulator_get(&client->dev, "vana");
> if (IS_ERR(sensor->vana)) {
> dev_err(&client->dev, "could not get regulator for vana\n");
> - return -ENODEV;
> + return PTR_ERR(sensor->vana);
> }
>
> if (!sensor->platform_data->set_xclk) {
> sensor->ext_clk = devm_clk_get(&client->dev, "ext_clk");
> if (IS_ERR(sensor->ext_clk)) {
> dev_err(&client->dev, "could not get clock\n");
> - return -ENODEV;
> + return PTR_ERR(sensor->ext_clk);
> }
>
> rval = clk_set_rate(sensor->ext_clk,
> @@ -2374,18 +2374,19 @@ static int smiapp_registered(struct v4l2_subdev
> *subdev) dev_err(&client->dev,
> "unable to set clock freq to %u\n",
> sensor->platform_data->ext_clk);
> - return -ENODEV;
> + return rval;
> }
> }
>
> if (gpio_is_valid(sensor->platform_data->xshutdown)) {
> - if (devm_gpio_request_one(&client->dev,
> - sensor->platform_data->xshutdown, 0,
> - "SMIA++ xshutdown") != 0) {
> + rval = devm_gpio_request_one(
> + &client->dev, sensor->platform_data->xshutdown, 0,
> + "SMIA++ xshutdown");
> + if (rval < 0) {
> dev_err(&client->dev,
> "unable to acquire reset gpio %d\n",
> sensor->platform_data->xshutdown);
> - return -ENODEV;
> + return rval;
> }
> }
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2014-05-09 12:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-04 0:31 smiapp: Minor improvements, early preparation for DT support Sakari Ailus
2014-05-04 0:31 ` [PATCH 1/3] smiapp: Use better regulator name for the Device tree Sakari Ailus
2014-05-09 12:16 ` Laurent Pinchart
2014-05-04 0:31 ` [PATCH 2/3] smiapp: Check for GPIO validity using gpio_is_valid() Sakari Ailus
2014-05-09 12:18 ` Laurent Pinchart
2014-05-09 12:38 ` Sakari Ailus
2014-05-04 0:31 ` [PATCH 3/3] smiapp: Return correct return value in smiapp_registered() Sakari Ailus
2014-05-09 12:17 ` Laurent Pinchart [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=6542492.1vSdmarlZg@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
/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