public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] media: i2c: imx258: validate rotation only if it is provided
Date: Wed, 28 Oct 2020 10:23:43 +0100	[thread overview]
Message-ID: <20201028092343.GA100461@kozik-lap> (raw)
In-Reply-To: <20201005151559.12003-2-krzk@kernel.org>

On Mon, Oct 05, 2020 at 05:15:59PM +0200, Krzysztof Kozlowski wrote:
> The sensor supports rotation by 180 degrees however the value of
> "rotation" property should be validated only if it exists.  If
> "rotation" is missing, do not fail the probe:
> 
>     imx258: probe of 3-001a failed with error -22
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

This is actually a fix, so these should be added:
Fixes: 17121d12a5c1 ("media: imx258: Check the rotation property has a value of 180")
Cc: <stable@vger.kernel.org>

Best regards,
Krzysztof

> ---
>  drivers/media/i2c/imx258.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c
> index aedf8e7c6165..c52932e5b881 100644
> --- a/drivers/media/i2c/imx258.c
> +++ b/drivers/media/i2c/imx258.c
> @@ -1284,7 +1284,7 @@ static int imx258_probe(struct i2c_client *client)
>  	 * supports a single pixel order right now.
>  	 */
>  	ret = device_property_read_u32(&client->dev, "rotation", &val);
> -	if (ret || val != 180)
> +	if (!ret && val != 180)
>  		return -EINVAL;
>  
>  	/* Initialize subdev */
> -- 
> 2.17.1
> 

  reply	other threads:[~2020-10-29  0:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05 15:15 [PATCH 1/2] media: i2c: imx258: add HDR control Krzysztof Kozlowski
2020-10-05 15:15 ` [PATCH 2/2] media: i2c: imx258: validate rotation only if it is provided Krzysztof Kozlowski
2020-10-28  9:23   ` Krzysztof Kozlowski [this message]
2020-10-30 11:32     ` Krzysztof Kozlowski
2020-10-28  8:38 ` [PATCH 1/2] media: i2c: imx258: add HDR control Krzysztof Kozlowski

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=20201028092343.GA100461@kozik-lap \
    --to=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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