lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1406599159.5285.12.camel@joe-AO725>
Date:	Mon, 28 Jul 2014 18:59:19 -0700
From:	Joe Perches <joe@...ches.com>
To:	Murilo Opsfelder Araujo <mopsfelder@...il.com>
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	gregkh@...uxfoundation.org, klmckinney1@...il.com,
	mail@...ermatthias.de
Subject: Re: [PATCH] Staging: bcm: Bcmchar.c: remove else statement after
 return

On Mon, 2014-07-28 at 21:09 -0300, Murilo Opsfelder Araujo wrote:
> This patch makes checkpatch.pl script happier by fixing all warnings
> related to else statement after break or return.
[]
> diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
[]
> @@ -561,10 +561,10 @@ static int bcm_char_ioctl_gpio_set_request(void __user *argp,
>  		BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
>  				"GPIO_MODE_REGISTER read failed");
>  		return Status;
> -	} else {
> -		Status = STATUS_SUCCESS;
>  	}
>  
> +	Status = STATUS_SUCCESS;

This set of Status is unnecessary

>  	/* Set the gpio mode register to output */
>  	*(UINT *)ucResetValue |= (1<<uiBit);
>  	Status = wrmaltWithLock(Adapter, GPIO_MODE_REGISTER,

as it's immediately overwritten.

> @@ -669,10 +669,10 @@ static int bcm_char_ioctl_gpio_status_request(void __user *argp,
>  		Status = bytes;
>  		BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
>  				"RDM Failed\n");
> -		return Status;
>  	} else {
>  		Status = STATUS_SUCCESS;
>  	}
> +
>  	return Status;

	return STATUS_SUCCESS;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ