Re: [PATCH 1/2] clk: Provide dummy clk_unregister()

From: Mark Brown
Date: Wed Apr 18 2012 - 06:48:59 EST


On Wed, Apr 18, 2012 at 10:54:35AM +0100, Russell King - ARM Linux wrote:

> Don't make unregister calls return values. Think about this situation
> for a moment:

> You call an unregister function in a drivers ->remove function.
> The unregister function fails. However, the reason the ->remove
> function is being called is because the module is being removed.
> You can't stop the module being removed once the process has
> started. What do you do with this error?

> To put it another way, if an unregister function fails, you're buggered.

I absolutely agree, I think this is a stupid pattern for us to have
(generally the return values just get ignored...) but sadly it appears
to be the pattern that we have return values but ignore them probably
because the driver model does this.

Attachment: signature.asc
Description: Digital signature