Re: [PATCH v2] serial: sccnxp: Improve verify_port

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

 



On Tue, May 14, 2013 at 07:59:11PM +0400, Alexander Shiyan wrote:
> The patch improves verify_port procedure by comparing the type of
> port and IRQ numbers simultaneously. This can be important in the
> case of multiple drivers SCCNXP in the system that are different IRQs.

So this fixes a bug?  Really?

> Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx>
> ---
>  drivers/tty/serial/sccnxp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c
> index c773041..92e6195 100644
> --- a/drivers/tty/serial/sccnxp.c
> +++ b/drivers/tty/serial/sccnxp.c
> @@ -713,8 +713,8 @@ static void sccnxp_config_port(struct uart_port *port, int flags)
>  
>  static int sccnxp_verify_port(struct uart_port *port, struct serial_struct *s)
>  {
> -	if ((s->type == PORT_UNKNOWN) || (s->type == PORT_SC26XX))
> -		return 0;
> +	if ((s->type != PORT_UNKNOWN) && (s->type != PORT_SC26XX))
> +		return -EINVAL;

Why are you now returning a different value?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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