From patchwork Mon Mar 26 13:21:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hariprasath.elango@gmail.com X-Patchwork-Id: 10307801 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 82950600CC for ; Mon, 26 Mar 2018 13:23:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64E2329719 for ; Mon, 26 Mar 2018 13:23:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60B38296E2; Mon, 26 Mar 2018 13:23:23 +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.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable 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 9AB80296E2 for ; Mon, 26 Mar 2018 13:22:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751840AbeCZNWH (ORCPT ); Mon, 26 Mar 2018 09:22:07 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35764 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983AbeCZNWF (ORCPT ); Mon, 26 Mar 2018 09:22:05 -0400 Received: by mail-pg0-f66.google.com with SMTP id j3so1512847pgf.2; Mon, 26 Mar 2018 06:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=qMYaxlfVnNpGAPxbHF2FerqH2P85KGa6Zwlypo9ZJkw=; b=Pbwkr+NqhygNcgpzvP4KEj12QTOW0tBNEha2c4GQP7ZlKuK+zKkKFNbpDr8cV7c4nB rmq1K5S0UR4Rg83u377l/TOA5q0I+ps2oyJHy1hhPp79aYBniMgdCoxF4y5z+AoS7wyk ZBe6dy4PM54qijBAUUb9zmdfd8aDFQtbT07AQxLmgNOAb7fJOKABPouX8bGrGwnvHKom drNQG43dJN04QtZkHWtfdfxW8wkLAg+fBSYYDScc7OdwA9D4VZ32gztXJwm7fRBtiYDn cS/aN0M9RLhOQb47QdGQDsd81Osv/kyAqou/qm7K/Ln50o3mbWYpf7QnuPhvfL/PaIeP hlgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qMYaxlfVnNpGAPxbHF2FerqH2P85KGa6Zwlypo9ZJkw=; b=OmVWqWITXx6X7U4gOy0kzD92cr375utMZvXHZpWy55i15mr5S1tIUyw3h/grhMrxOj Uboc3vN+tWrHi/VOnWOjQIMSv/k0yrZ0nLldrsUm/jpX5StDWAFJTSVDtBf1HoF5cB+h QJxFOo2rEEg6CPRvgCgSi1eqs+7se2hjkiO97Jxvq4e6WDYNJRIOEVCPHUXxBuryRbaP 4HDQUzkU4eNbDqPzXdlbmVQNK9FWdWJyeddC8m+jYRiXlz13coKiVV1aWjJUQBTKJd6Z 2AmBBT1SfC3JlYZGWuBnqB4T1cZ+FcpeUmtSAoxIs0JDGRTHg3h8SpACR5R7XsfOo7FZ tmBA== X-Gm-Message-State: AElRT7Gs6sv84/+W+xOK9StxNwnnkKPnfOsRtPgrqHc8b0AneIWEGVDb SGlLqILh/idXxYvlz9QAX1Q= X-Google-Smtp-Source: AG47ELv2dOtUlwiep/bIkMH6uGs5QZxg8e5Zre7Sa/OR1PFEtKdSHtSrHkSbUNSODIW71KjMFpMQ1A== X-Received: by 10.101.86.198 with SMTP id w6mr14139948pgs.294.1522070524774; Mon, 26 Mar 2018 06:22:04 -0700 (PDT) Received: from hariprasath.domain.name ([122.165.96.181]) by smtp.gmail.com with ESMTPSA id p1sm28950026pgr.67.2018.03.26.06.22.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Mar 2018 06:22:03 -0700 (PDT) From: hariprasath.elango@gmail.com To: aditya.shankar@microchip.com, gregkh@linuxfoundation.org, ganesh.krishna@microchip.com Cc: gehariprasath@gmail.com, HariPrasath Elango , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: wilc1000: remove unused return variable Date: Mon, 26 Mar 2018 18:51:55 +0530 Message-Id: <20180326132155.24612-1-hariprasath.elango@gmail.com> X-Mailer: git-send-email 2.10.0.GIT 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 From: HariPrasath Elango In this function,removed the unused integer variable as it is not actually used to return function success or failure. Return is a pointer to net_device structure. Signed-off-by: HariPrasath Elango --- drivers/staging/wilc1000/linux_mon.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index 47e3025..169213f 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -252,7 +252,7 @@ static const struct net_device_ops wilc_wfi_netdev_ops = { * @brief WILC_WFI_init_mon_interface * @details * @param[in] - * @return int : Return 0 on Success + * @return Pointer to net_device * @author mdaftedar * @date 12 JUL 2012 * @version 1.0 @@ -260,7 +260,6 @@ static const struct net_device_ops wilc_wfi_netdev_ops = { struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_device *real_dev) { - u32 ret = 0; struct WILC_WFI_mon_priv *priv; /*If monitor interface is already initialized, return it*/ @@ -275,8 +274,7 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, wilc_wfi_mon->name[IFNAMSIZ - 1] = 0; wilc_wfi_mon->netdev_ops = &wilc_wfi_netdev_ops; - ret = register_netdevice(wilc_wfi_mon); - if (ret) { + if (register_netdevice(wilc_wfi_mon)) { netdev_err(real_dev, "register_netdevice failed\n"); return NULL; }