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] [day] [month] [year] [list]
Message-ID: <4C79549CB6F772498162A641D92D5328039E9F92@penmb01.corp.atmel.com>
Date:	Thu, 8 Dec 2011 11:18:23 +0800
From:	"Wu, Josh" <Josh.wu@...el.com>
To:	"Russell King - ARM Linux" <linux@....linux.org.uk>
Cc:	<g.liakhovetski@....de>, <linux-media@...r.kernel.org>,
	"Ferre, Nicolas" <Nicolas.FERRE@...el.com>,
	<linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH 1/2] [media] V4L: atmel-isi: add code toenable/disableISI_MCK clock

On Thursday, December 08, 2011 6:40AM, Russell King wrote:

> On Wed, Dec 07, 2011 at 06:12:52PM +0800, Wu, Josh wrote:
>> Hi, Russell King
>> 
>> On Wed, Dec 07, 2011 at 4:50 PM, Russell King wrote:
>> 
>> > On Wed, Nov 30, 2011 at 06:06:43PM +0800, Josh Wu wrote:
>> >> +	/* Get ISI_MCK, provided by programmable clock or external clock
>> */
>> >> +	isi->mck = clk_get(dev, "isi_mck");
>> >> +	if (IS_ERR_OR_NULL(isi->mck)) {
>> 
>> > This should be IS_ERR()
>> 
>> So it means the clk_get() will never return NULL even when clk
structure
>> is NULL in clk lookup entry. Right?

> It is not the drivers business to know whether NULL is valid or not.

> clk_get() is defined to either return an error pointer, or a cookie
> which the rest of the clk API must accept.

> If an implementation decides that clk_get() can return NULL and deals
> with that in the rest of the API (eg, to mean 'there is no clock but
> don't fail for this') then drivers must not reject that.

> If a driver rejects NULL then it is performing checks outside of the
> definition of the clk API, and making assumptions about the nature of
> valid cookies.

Thanks for the feedback. I will send v3 patch which will not check the
null return value.

Best Regards,
Josh Wu
--
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