1
0
Fork 0

staging: gs_fpgaboot: cleanup in gs_fpgaboot_init function

the error path is cleanup to return the correct (function call return value)
error code.

Signed-off-by: Devendra Naga <devendranaga4@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
wifi-calibration
Devendra Naga 2014-10-25 02:01:54 +05:30 committed by Greg Kroah-Hartman
parent e29d3ebcda
commit 92bf93f126
1 changed files with 5 additions and 10 deletions

View File

@ -344,43 +344,38 @@ err_out1:
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)