[PATCH] mpc52xx/serial: fix error paths in probe function

Wolfram Sang w.sang at pengutronix.de
Fri Nov 28 07:30:48 EST 2008


On Thu, Nov 27, 2008 at 11:40:55AM -0500, Jon Smirl wrote:

> > +       if (port->irq == NO_IRQ) {
> > +               dev_err(&op->dev, "Could not get irq\n");
> > +               return -ENODEV;
> > +       }
> 
> Doesn't NO_IRQ imply polling, not an error?

See below, I just copied the original behaviour. Having another look at
mpc52xx_uart_setup, I don't see any polling option there, so I think it
is correct to do this.

> 
> >
> >        dev_dbg(&op->dev, "mpc52xx-psc uart at %p, irq=%x, freq=%i\n",
> >                (void *)port->mapbase, port->irq, port->uartclk);
> >
> > -       if ((port->irq == NO_IRQ) || !port->mapbase) {
> > -               printk(KERN_ERR "Could not allocate resources for PSC\n");
> > -               return -EINVAL;
> > -       }

(Originaly dropout for NO_IRQ)

Regards,

   Wolfram

-- 
  Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20081127/470fff4a/attachment.pgp>


More information about the Linuxppc-dev mailing list