lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <532371F4.9050509@gmail.com>
Date:	Fri, 14 Mar 2014 22:17:40 +0100
From:	Sylwester Nawrocki <sylvester.nawrocki@...il.com>
To:	Josh Wu <josh.wu@...el.com>
CC:	g.liakhovetski@....de, m.chehab@...sung.com,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [media] ov2640: add support for async device registration

Hi Josh,

On 03/14/2014 11:12 AM, Josh Wu wrote:
> +	clk = v4l2_clk_get(&client->dev, "mclk");
> +	if (IS_ERR(clk))
> +		return -EPROBE_DEFER;

You should instead make it:

		return PTR_ERR(clk);

But you will need this patch for that to work:
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/drivers/clk/clk.c?id=a34cd4666f3da84228a82f70c94b8d9b692034ea

With this patch there is no need to overwrite any returned error
value with EPROBE_DEFER.

> @@ -1097,23 +1106,26 @@ static int ov2640_probe(struct i2c_client *client,
>   	v4l2_ctrl_new_std(&priv->hdl,&ov2640_ctrl_ops,
>   			V4L2_CID_HFLIP, 0, 1, 1, 0);
>   	priv->subdev.ctrl_handler =&priv->hdl;
> -	if (priv->hdl.error)
> -		return priv->hdl.error;
> -
> -	priv->clk = v4l2_clk_get(&client->dev, "mclk");
> -	if (IS_ERR(priv->clk)) {
> -		ret = PTR_ERR(priv->clk);
> -		goto eclkget;

--
Regards,
Sylwester
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ