[PATCH 01/10] Add a common struct clk

Paul Walmsley paul at pwsan.com
Wed May 4 19:35:36 EDT 2011


Hi

On Mon, 2 May 2011, Russell King - ARM Linux wrote:

> This does bring us to an interesting question though: should clk_set_rate()
> succeed or fail with a NULL clk?  There is no clock to control, so my
> feeling is that it should fail, just like clk_get_rate() should return
> zero because the rate is meaningless.  There is no rate to get and no
> rate to set.

Returning an error would be my preference when a NULL or bogus clock 
pointer is passed to any clk_* operation, especially since those 
operations will need to dereference the clock pointer.


- Paul



More information about the linux-arm-kernel mailing list