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]
Date:	Mon, 16 Apr 2012 16:11:24 -0700
From:	"Turquette, Mike" <mturquette@...com>
To:	Sascha Hauer <s.hauer@...gutronix.de>
Cc:	Andrew Lunn <andrew@...n.ch>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Russell King <linux@....linux.org.uk>, patches@...aro.org,
	Rajendra Nayak <rnayak@...com>, linux-kernel@...r.kernel.org,
	Saravana Kannan <skannan@...eaurora.org>,
	linux-arm-kernel@...ts.infradead.org,
	Olof Johansson <olof@...om.net>, linaro-dev@...ts.linaro.org,
	arnd.bergmann@...aro.org, Richard Zhao <richard.zhao@...aro.org>,
	Shawn Guo <shawn.guo@...escale.com>
Subject: Re: [PATCH 13/13] clk: basic: improve parent_names & return errors

On Mon, Apr 16, 2012 at 1:52 PM, Sascha Hauer <s.hauer@...gutronix.de> wrote:
> On Wed, Apr 11, 2012 at 06:02:51PM -0700, Mike Turquette wrote:
>> This patch is the basic clk version of 'clk: core: copy parent_names &
>> return error codes'.
>>
>> The registration functions are changed to allow the core code to copy
>> the array of strings and allow platforms to declare those arrays as
>> __initdata.
>>
>> This patch also converts all of the basic clk registration functions to
>> return error codes which better aligns them with the existing clk.h api.
>>
>>
>> + */
>>  struct clk *clk_register_divider(struct device *dev, const char *name,
>>               const char *parent_name, unsigned long flags,
>>               void __iomem *reg, u8 shift, u8 width,
>>               u8 clk_divider_flags, spinlock_t *lock)
>>  {
>>       struct clk_divider *div;
>> -     struct clk *clk;
>> +     struct clk *clk = ERR_PTR(-ENOMEM);
>> +     const char *parent_names[1];
>>
>> +     /* allocate the divider */
>>       div = kzalloc(sizeof(struct clk_divider), GFP_KERNEL);
>> -
>>       if (!div) {
>>               pr_err("%s: could not allocate divider clk\n", __func__);
>>               return NULL;
>
> You missed a conversion to ERR_PTR here.

Thanks for the catch.

Mike

> Sascha
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
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