[PATCH V2 1/6] clk: exynos-audss: convert to platform device
Sylwester Nawrocki
s.nawrocki at samsung.com
Tue Sep 24 05:47:45 EDT 2013
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
More information about the linux-arm-kernel
mailing list