[PATCH 3/4] amba-pl011: probe fail if we can get the clock

Sascha Hauer s.hauer at pengutronix.de
Fri Sep 17 09:52:41 EDT 2010


On Sun, Sep 12, 2010 at 01:38:30PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> subject fix on git://git.jcrosoft.org/barebox.git sh-prepare

Naa, should have read this first before answering the last mail.


> 
> Best Regards,
> J.
> On 13:27 Sun 12 Sep     , Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> > ---
> >  drivers/serial/amba-pl011.c |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
> > index 07508d0..8ddba2e 100644
> > --- a/drivers/serial/amba-pl011.c
> > +++ b/drivers/serial/amba-pl011.c
> > @@ -34,6 +34,7 @@
> >  #include <asm/io.h>
> >  #include <linux/amba/serial.h>
> >  #include <linux/clk.h>
> > +#include <linux/err.h>
> >  
> >  /*
> >   * We wrap our port structure around the generic console_device.
> > @@ -160,6 +161,9 @@ static int pl011_probe(struct device_d *dev)
> >  
> >  	uart->clk = clk_get(dev, NULL);
> >  
> > +	if (PTR_ERR(uart->clk) < 0)
> > +		return PTR_ERR(uart->clk);
> > +
> >  	cdev = &uart->uart;
> >  	dev->type_data = cdev;
> >  	cdev->dev = dev;
> > -- 
> > 1.7.1
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list