Re: [PATCH v2] clkdev: Always allocate a struct clk and call __clk_get() w/ CCF

From: Stephen Boyd
Date: Fri Feb 06 2015 - 12:12:05 EST


On 02/06/15 04:34, Tomeu Vizoso wrote:
> On 02/06/2015 02:40 AM, Stephen Boyd wrote:
>
>> @@ -209,17 +205,13 @@ struct clk *clk_get_sys(const char *dev_id, const char *con_id)
>> if (!cl)
>> goto out;
>>
>> - if (!__clk_get(cl->clk)) {
>> + clk = __clk_create_clk(__clk_get_hw(cl->clk), dev_id, con_id);
> We need to check for clk being an error either here or in __clk_get
> because __clk_create_clk can return -ENOMEM.

Good catch. Thanks.

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/