lkml.org 
[lkml]   [2016]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] spi: octeon: Add thunderx driver
On Thu, Jul 28, 2016 at 10:31:44AM +0200, Jan Glauber wrote:

> +config SPI_THUNDERX
> + tristate "Cavium ThunderX SPI controller"
> + depends on (ARM64 || CONFIG_TEST) && 64BIT && PCI

You mean COMPILE_TEST.

> + p->clk = devm_clk_get(dev, NULL);
> + if (IS_ERR(p->clk))
> + goto out_unmap;

We're now just using the normal clock API which is good but I'm now
unclear what is going to ensure that the clock is there - is there some
other change elsewhere that I'm not aware of? We're also not passing
the resulting error code back to the caller which will break deferred
probe.

> +out_clock:
> + clk_disable_unprepare(p->clk);
> +out_clock_devm:
> + devm_clk_put(dev, p->clk);

There's no point in using managed allocations if you're going to manually
free things...
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-08-01 21:01    [W:0.059 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site