Re: [PATCH v5 2/3] tty/serial: at91: use mctrl_gpio helpers

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

 



Hello.

Понедельник,  3 марта 2014, 12:11 +01:00 от Richard Genoud <noreply.rgenoud@xxxxxxxxx>:
> On sam9x5, dedicated CTS (and RTS) pins are unusable together with the
> LCDC, the EMAC, or the MMC because they share the same line.
> 
> Moreover, the USART controller doesn't handle DTR/DSR/DCD/RI signals,
> so we have to control them via GPIO.
> 
> This patch permits to use GPIOs to control the CTS/RTS/DTR/DSR/DCD/RI
> signals.
> 
> Signed-off-by: Richard Genoud <richard.genoud@xxxxxxxxx>

...
> +static int atmel_init_gpios(struct atmel_uart_port *p, struct device *dev)
> +{
> +	int err = 0;
> +
> +	p->gpios = mctrl_gpio_init(dev, 0);
> +	if (IS_ERR_OR_NULL(p->gpios))
> +		err = PTR_ERR(p->gpios);
> +
> +	return err;
> +}

So what happen if mctrl_gpio_init() returns NULL?
Your function return 0, ie not an error.
Just use IS_ERR() macro here.

Thanks.
---
��.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