From patchwork Mon May 13 10:43:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 10940689 X-Patchwork-Delegate: sameo@linux.intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5EFFA933 for ; Mon, 13 May 2019 10:44:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 524C123B24 for ; Mon, 13 May 2019 10:44:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46CD02785D; Mon, 13 May 2019 10:44:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E31DE23B24 for ; Mon, 13 May 2019 10:44:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729131AbfEMKoH (ORCPT ); Mon, 13 May 2019 06:44:07 -0400 Received: from mga05.intel.com ([192.55.52.43]:20725 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729132AbfEMKoG (ORCPT ); Mon, 13 May 2019 06:44:06 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 May 2019 03:44:05 -0700 X-ExtLoop1: 1 Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 13 May 2019 03:44:04 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id AA3D1492; Mon, 13 May 2019 13:43:59 +0300 (EEST) From: Andy Shevchenko To: =?utf-8?q?Cl=C3=A9ment_Perrochaud?= , Charles Gorand , linux-nfc@lists.01.org, Samuel Ortiz , linux-wireless@vger.kernel.org, Sedat Dilek , Oleg Zhurakivskyy Cc: Andy Shevchenko Subject: [PATCH v2 06/12] NFC: nxp-nci: Get rid of useless label Date: Mon, 13 May 2019 13:43:52 +0300 Message-Id: <20190513104358.59716-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190513104358.59716-1-andriy.shevchenko@linux.intel.com> References: <20190513104358.59716-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Return directly in ->probe() since there no special cleaning is needed. Signed-off-by: Andy Shevchenko --- drivers/nfc/nxp-nci/i2c.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c index 9eeb59d1199a..6379f2198524 100644 --- a/drivers/nfc/nxp-nci/i2c.c +++ b/drivers/nfc/nxp-nci/i2c.c @@ -276,16 +276,13 @@ static int nxp_nci_i2c_probe(struct i2c_client *client, if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { nfc_err(&client->dev, "Need I2C_FUNC_I2C\n"); - r = -ENODEV; - goto probe_exit; + return -ENODEV; } phy = devm_kzalloc(&client->dev, sizeof(struct nxp_nci_i2c_phy), GFP_KERNEL); - if (!phy) { - r = -ENOMEM; - goto probe_exit; - } + if (!phy) + return -ENOMEM; phy->i2c_dev = client; i2c_set_clientdata(client, phy); @@ -309,7 +306,7 @@ static int nxp_nci_i2c_probe(struct i2c_client *client, r = nxp_nci_probe(phy, &client->dev, &i2c_phy_ops, NXP_NCI_I2C_MAX_PAYLOAD, &phy->ndev); if (r < 0) - goto probe_exit; + return r; r = request_threaded_irq(client->irq, NULL, nxp_nci_i2c_irq_thread_fn, @@ -318,7 +315,6 @@ static int nxp_nci_i2c_probe(struct i2c_client *client, if (r < 0) nfc_err(&client->dev, "Unable to register IRQ handler\n"); -probe_exit: return r; }