Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752986AbbKWLyr (ORCPT ); Mon, 23 Nov 2015 06:54:47 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:35576 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752621AbbKWLyp (ORCPT ); Mon, 23 Nov 2015 06:54:45 -0500 From: Sudip Mukherjee To: Sudeep Dutt , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [PATCH char-misc-next 3/4] misc: mic: return error directly Date: Mon, 23 Nov 2015 17:24:31 +0530 Message-Id: <1448279672-12208-3-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1448279672-12208-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1448279672-12208-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1163 Lines: 37 Instead of jumping to a label and then returning from there lets return directly. Signed-off-by: Sudip Mukherjee --- drivers/misc/mic/host/mic_x100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mic/host/mic_x100.c b/drivers/misc/mic/host/mic_x100.c index 317e25f..37fa898 100644 --- a/drivers/misc/mic/host/mic_x100.c +++ b/drivers/misc/mic/host/mic_x100.c @@ -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; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/