Re: [PATCH 6/7] staging: dgnc: Siplify the dgnc_start function

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

 



On Wed, Aug 06, 2014 at 02:21:24PM +0200, Konrad Zapalowicz wrote:
> diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
> index da7b226..66f2b2d 100644
> --- a/drivers/staging/dgnc/dgnc_driver.c
> +++ b/drivers/staging/dgnc/dgnc_driver.c
> @@ -278,65 +278,63 @@ static int dgnc_start(void)
>  	int rc = 0;
>  	unsigned long flags;
>  
> -	if (dgnc_driver_start == FALSE) {
> +	if (unlikely(dgnc_driver_start == TRUE))
> +		goto exit;

Don't add unlikely() in driver code.  Just return directly here.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux