[PATCHv2] staging: gs_fpgaboot: remove redundant code
Dan Carpenter
dan.carpenter at oracle.com
Thu May 28 11:07:36 UTC 2015
On Thu, May 28, 2015 at 10:51:38AM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> remove redundant code in this function.remove return value check for
> function that always return success.
>
> Signed-off-by: Gujulan Elango Hari Prasath <hgujulan at visteon.com>
> ---
> v2:address review comments from Dan.Remove return value check
> for the function gs_release_image as it always returns success and
> rearrange the code accordingly.Also delete debug messages.
> ---
> drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 44 ++++++++-----------------------
> 1 file changed, 11 insertions(+), 33 deletions(-)
>
> diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
> index a3a10f9..a792c1a 100644
> --- a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
> +++ b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
> @@ -288,7 +288,7 @@ static void finish_driver(void)
>
> static int gs_fpgaboot(void)
> {
> - int err;
> + int err = 0;
Don't do this. It's just turns off GCC's warning about uninitialized
variables.
regards,
dan carpenter
More information about the devel
mailing list