Re: [PATCH v4 05/13] tty: serial: 8250: Remove else after return

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

 



On Fri, 2016-01-08 at 18:43 +0100, Anton Wuerfel wrote:
> This patch fixes checkpatch warnings about unnecessary else blocks
> after
> return statements.

> --- a/drivers/tty/serial/8250/8250_pci.c
> +++ b/drivers/tty/serial/8250/8250_pci.c
> @@ -805,10 +805,10 @@ static int pci_netmos_9900_numports(struct
> pci_dev *dev)
>  
>  	pi = (c & 0xff);

And here the parens are redundant.

>  
> -	if (pi == 2) {
> +	if (pi == 2)
>  		return 1;
> -	} else if ((pi == 0) &&
> -			   (dev->device ==
> PCI_DEVICE_ID_NETMOS_9900)) {
> +
> +	if ((pi == 0) && (dev->device == PCI_DEVICE_ID_NETMOS_9900))
> {

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy

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



[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux