Re: [PATCH V2 1/6] clk: exynos-audss: convert to platform device

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

 




On 24/09/13 11:20, Tomasz Figa wrote:
>> +static int exynos_audss_clk_remove(struct platform_device *pdev)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i < EXYNOS_AUDSS_MAX_CLKS; i++) {
>> +		if (clk_table[i])
> 
> I believe clk_register_* functions return ERR_PTR() in case of failure,
> not NULL, so this should be accounted for either here or at probe time.
> Possibly checking for registration error in probe() would be the best
> solution, although bloating the code a bit (but what error path isn't?).

After registering all clocks a loop iterating over all entries of the
clk_table[] array could be added and if any of the entries is ERR_PTR()
either an error could be just logged or the successfully registered
clocks could be freed and probe() could fail. It doesn't really seems
much additional code.

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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux