lkml.org 
[lkml]   [2011]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 09/16] ARM: pxa: don't treat NULL clk as an error
    Date
    clk_get() returns a struct clk cookie to the driver and some platforms
    may return NULL if they only support a single clock. clk_get() has only
    failed if it returns a ERR_PTR() encoded pointer.

    Cc: Eric Miao <eric.y.miao@gmail.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Jamie Iles <jamie@jamieiles.com>
    ---
    drivers/pcmcia/pxa2xx_base.c | 5 +++--
    1 files changed, 3 insertions(+), 2 deletions(-)

    diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
    index 3755e7c..6e5b55e 100644
    --- a/drivers/pcmcia/pxa2xx_base.c
    +++ b/drivers/pcmcia/pxa2xx_base.c
    @@ -16,6 +16,7 @@

    ======================================================================*/

    +#include <linux/err.h>
    #include <linux/module.h>
    #include <linux/slab.h>
    #include <linux/init.h>
    @@ -297,8 +298,8 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
    }

    clk = clk_get(&dev->dev, NULL);
    - if (!clk)
    - return -ENODEV;
    + if (IS_ERR(clk))
    + return PTR_ERR(clk);

    pxa2xx_drv_pcmcia_ops(ops);

    --
    1.7.3.4


    \
     
     \ /
      Last update: 2011-01-11 13:49    [W:4.029 / U:0.200 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site