From patchwork Tue Feb 16 08:39:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 8322731 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1748C9F372 for ; Tue, 16 Feb 2016 08:40:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3C43B202F8 for ; Tue, 16 Feb 2016 08:40:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6AEB7202A1 for ; Tue, 16 Feb 2016 08:40:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754416AbcBPIkR (ORCPT ); Tue, 16 Feb 2016 03:40:17 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:32786 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754470AbcBPIkN (ORCPT ); Tue, 16 Feb 2016 03:40:13 -0500 Received: by mail-pa0-f46.google.com with SMTP id fl4so87812522pad.0 for ; Tue, 16 Feb 2016 00:40:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9qmHK4VK7BFguWvfCJ+awuyMrhCpXqeXW5CQx/dJLAY=; b=p+y1Qyeyw0kpsA/teyAL0OVDJipD6BRBDnUvfu110GQHM0IZf5ieLrHgKgUCIaK4fg VkA3HxX5qTwYRLNO25l/9j47+0xAW6VyS4oAfsEtEjW5E7Rl9vCo4MjmY5ZV1hfvDFTr yMN208f3CujCKP33dSmtuVj4txlv+L/N3wni4MdEhbmABfrLUJan0Ve7GCTYQNBedHRc XDpZ6Y4F2x3HZGdT2ilXHfC7LmPW/un31qUIphQuJbNg6+BN8gX59WwqWnu15nXRQwZ6 IolFxDP5oA+ceKXkUgLWKtIajONC/215nF+9+9mJgJ2yRZosiqYNsvMeQWBI8q+bKcvm SElw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9qmHK4VK7BFguWvfCJ+awuyMrhCpXqeXW5CQx/dJLAY=; b=iZ+OVOUr1wiRfSq5AV3SdGWBaQ5lDPP3MDLYg0Nqvpp3CxaMOmWpSdQgz8WAHqMKn3 kIiRkafTv3cpEC+gDjUztvaJ0RKQU71brv7vP5wjJOzmDZ/PxZi0Wz/tdQVB9SqK/rqt Xzf9SYaj0s8TArh1q3z7KBUZLaU5cUb4TPI58IBmfAIIAhBt4K5ARAhpR0kReBguCZq/ +mtpg4HOwTkoXi047Dvc0+zq2tyjtngEMZXxHmQC/KUzConrG/ihyMbBRNRTSbFCd+oo 0tbdd/j9XV7g0OMuSjJQlBXPmdZOTDxRUqxRzwAdxxITkqTxe6YoVtB8MVBT8PjtHEvF aVkg== X-Gm-Message-State: AG10YOR82BbokN05iMkXAuRUX6TWl2jHSRxJJR2FIz30mEX7GGeobhqRMQR6nXzvKNh0CA== X-Received: by 10.66.139.137 with SMTP id qy9mr29496706pab.57.1455612013108; Tue, 16 Feb 2016 00:40:13 -0800 (PST) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id s197sm43783511pfs.62.2016.02.16.00.40.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Feb 2016 00:40:12 -0800 (PST) From: Chaehyun Lim To: gregkh@linuxfoundation.org Cc: johnny.kim@atmel.com, austin.shin@atmel.com, chris.park@atmel.com, tony.cho@atmel.com, glen.lee@atmel.com, leo.kim@atmel.com, linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, Chaehyun Lim Subject: [PATCH 4/7] staging: wilc1000: handle_set_mac_address: change return type to void Date: Tue, 16 Feb 2016 17:39:52 +0900 Message-Id: <1455611995-28773-4-git-send-email-chaehyun.lim@gmail.com> X-Mailer: git-send-email 2.7.1 In-Reply-To: <1455611995-28773-1-git-send-email-chaehyun.lim@gmail.com> References: <1455611995-28773-1-git-send-email-chaehyun.lim@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When handle_set_mac_address is called in hostIFthread that is a kernel thread, it is not checked return type of this function. This patch changes return type to void and removes a brace of if statement due to have a single statement. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/host_interface.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 65d2393..c671f05 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -424,15 +424,15 @@ static s32 handle_get_ip_address(struct wilc_vif *vif, u8 idx) return result; } -static s32 handle_set_mac_address(struct wilc_vif *vif, - struct set_mac_addr *set_mac_addr) +static void handle_set_mac_address(struct wilc_vif *vif, + struct set_mac_addr *set_mac_addr) { s32 result = 0; struct wid wid; u8 *mac_buf = kmemdup(set_mac_addr->mac_addr, ETH_ALEN, GFP_KERNEL); if (!mac_buf) - return -ENOMEM; + return; wid.id = (u16)WID_MAC_ADDR; wid.type = WID_STR; @@ -441,13 +441,10 @@ static s32 handle_set_mac_address(struct wilc_vif *vif, result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1, wilc_get_vif_idx(vif)); - if (result) { + if (result) PRINT_ER("Failed to set mac address\n"); - result = -EFAULT; - } kfree(mac_buf); - return result; } static s32 handle_get_mac_address(struct wilc_vif *vif,