Devendra Since these are small changes, I want one patch set instead of three unless Greg says otherwise. Thank you, ISS On Sat, Oct 25, 2014 at 02:01:54AM +0530, Devendra Naga wrote: > the error path is cleanup to return the correct (function call return value) > error code. > > Signed-off-by: Devendra Naga <devendranaga4@xxxxxxxxx> > --- > drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > > diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c > index 6aa9d7c..e20fc86 100644 > --- a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c > +++ b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c > @@ -368,43 +368,38 @@ err_out: > > static int __init gs_fpgaboot_init(void) > { > - int err, r; > - > - r = -1; > + int err; > > pr_info("FPGA DOWNLOAD --->\n"); > > pr_info("FPGA image file name: %s\n", file); > > err = init_driver(); > - if (err != 0) { > + if (err) { > pr_err("FPGA DRIVER INIT FAIL!!\n"); > - return r; > + return err; > } > > err = xl_init_io(); > if (err) { > pr_err("GPIO INIT FAIL!!\n"); > - r = -1; > goto errout; > } > > err = gs_fpgaboot(); > if (err) { > pr_err("FPGA DOWNLOAD FAIL!!\n"); > - r = -1; > goto errout; > } > > pr_info("FPGA DOWNLOAD DONE <---\n"); > > - r = 0; > - return r; > + return 0; > > errout: > finish_driver(); > > - return r; > + return err; > } > > static void __exit gs_fpgaboot_exit(void) > -- > 1.7.9.5 > _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel