misc: mic: return error directly
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Mon, 23 Nov 2015 11:54:31 +0000 (17:24 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 06:53:40 +0000 (22:53 -0800)
Instead of jumping to a label and then returning from there lets return
directly.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mic/host/mic_x100.c

index 317e25f..37fa898 100644 (file)
@@ -450,14 +450,14 @@ mic_x100_load_firmware(struct mic_device *mdev, const char *buf)
 
        rc = mic_x100_get_boot_addr(mdev);
        if (rc)
-               goto done;
+               return rc;
        /* load OS */
        rc = request_firmware(&fw, mdev->cosm_dev->firmware, &mdev->pdev->dev);
        if (rc < 0) {
                dev_err(&mdev->pdev->dev,
                        "ramdisk request_firmware failed: %d %s\n",
                        rc, mdev->cosm_dev->firmware);
-               goto done;
+               return rc;
        }
        if (mdev->bootaddr > mdev->aper.len - fw->size) {
                rc = -EINVAL;