Re: [PATCH v5 05/15] tty: serial: 8250: Remove else after return

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

 



On Wed, 2016-01-13 at 17:39 +0100, Anton Wuerfel wrote:
> This patch fixes checkpatch warnings about unnecessary else blocks
> after
> return statements.
> 

> @@ -816,12 +816,11 @@ static int pci_netmos_9900_numports(struct
> pci_dev *dev)
>  		 * advertising the same function 3 as the 4s+2s1p
> config.
>  		 */
>  		sub_serports = dev->subsystem_device & 0xf;
> -		if (sub_serports > 0) {
> +		if (sub_serports > 0)
>  			return sub_serports;
> -		} else {
> -			dev_err(&dev->dev, "NetMos/Mostech serial
> driver ignoring port on ambiguous config.\n");
> -			return 0;
> -		}
> +
> +		dev_err(&dev->dev, "NetMos/Mostech serial driver
> ignoring port on ambiguous config.\n");

Here you may put the literal on the next line and indent it properly to
&. It might not fit the 80 character limit, but I think still worth to
do.

-- 
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