lkml.org 
[lkml]   [2012]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/2] clk: Provide dummy clk_unregister()
    On Wed, Apr 18, 2012 at 09:07:12AM +0100, Mark Brown wrote:
    > +/**
    > + * clk_unregister - unregister a currently registered clock
    > + * @clk: clock to unregister
    > + *
    > + * Currently unimplemented.
    > + */
    > +int clk_unregister(struct clk *clk)
    > +{
    > + return -EINVAL;

    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.


    \
     
     \ /
      Last update: 2012-04-18 22:37    [W:0.022 / U:62.164 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site