Re: [PATCH v3 1/4] tty: serial_mctrl_gpio: Add irqs helpers for input lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Четверг, 12 февраля 2015, 14:29 +01:00 от Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>:
...
> > +int mctrl_gpio_request_irqs(struct mctrl_gpios *gpios)
> 
> > +{
> 
> > +	struct uart_port *port = gpios->port;
> 
> > +	int *irq = gpios->irq;
> 
> > +	enum mctrl_gpio_idx i;
> 
> > +	int err = 0;
> 
> > +
> 
> > +	/* When gpios is NULL just gpio irqs are also never set
> 
> > +	 * so return without any error */
> 
> > +	if (IS_ERR_OR_NULL(gpios))
> 
> > +		return err;
> 
> I'd expect drivers using mctrl-gpio to error out if mctrl_gpio_init_dt
> 
> fails. Also mctrl_gpio_init_dt never returns NULL, so IMHO this check
> 
> can be dropped. (There are more places in mctrl-gpio that should be
> 
> fixed accordingly.

At least this check should be moved to start of this function due
future usage of gpios->port and gpios->irq.

---

��.n��������+%������w��{.n�����{��ǫ����{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux