Re: [patch] clk: vexpress: NULL dereference on error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2013-11-07 at 08:08 +0000, Dan Carpenter wrote:
> If the allocation fails then we dereference the NULL in the error path.
> Just return directly.
> 
> Fixes: ed27ff1db869 ('clk: Versatile Express clock generators ("osc") driver')
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c
> index 2dc8b41..a535c7b 100644
> --- a/drivers/clk/versatile/clk-vexpress-osc.c
> +++ b/drivers/clk/versatile/clk-vexpress-osc.c
> @@ -102,7 +102,7 @@ void __init vexpress_osc_of_setup(struct device_node *node)
>  
>  	osc = kzalloc(sizeof(*osc), GFP_KERNEL);
>  	if (!osc)
> -		goto error;
> +		return;
>  
>  	osc->func = vexpress_config_func_get_by_node(node);
>  	if (!osc->func) {

Well spotted, thanks!

Will get it queued with other vexpress clk changes.

Paweł


--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux