From patchwork Fri Nov 6 10:11:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 7568071 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 76D879F71A for ; Fri, 6 Nov 2015 10:12:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3B58E2076D for ; Fri, 6 Nov 2015 10:12:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 838CF20766 for ; Fri, 6 Nov 2015 10:12:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161181AbbKFKMU (ORCPT ); Fri, 6 Nov 2015 05:12:20 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:36402 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161036AbbKFKMR (ORCPT ); Fri, 6 Nov 2015 05:12:17 -0500 Received: by pacdm15 with SMTP id dm15so94626452pac.3 for ; Fri, 06 Nov 2015 02:12:17 -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=UAWN8xXwizprcnukEDG6yC3vavtOusE35zwX06qqRW0=; b=iFvGICHtYlllDKsjO1PV2XVj8kqGO1JskarVIygj/IPas7lny20LNC/1Ia2PMaGHYn LRhwjyFqQbc67qXK2Ggb3fSz5TRgYil3IU8Q9dy+eVIqrBr5i8i2yGI0Fw+UyTAnBxnE 8/btKOFWx6EJJtdqSg1NLq5OZlzN9AWjLWnXzpwCN93garcptiTSW/joo3+35CyNUZlG UkFrp91Y2kumVTbhKHzGGjtKC7OR5kdkrysLl4dt02NWxTmhdd1Z0xiZChQ3MPAOQi1c 4P9DOvC0RFMbDmv57eXuj7hsNzbaCNgZJj7xXw48EWXiAfymZziMNNs/Sy6pKn03MA3R lPnQ== X-Received: by 10.68.134.1 with SMTP id pg1mr16562768pbb.133.1446804737526; Fri, 06 Nov 2015 02:12:17 -0800 (PST) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id hq1sm13086075pbb.43.2015.11.06.02.12.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 Nov 2015 02:12:16 -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, Chaehyun Lim Subject: [PATCH V3 12/12] staging: wilc1000: remove rates variable in host_int_add_station Date: Fri, 6 Nov 2015 19:11:21 +0900 Message-Id: <1446804681-8873-12-git-send-email-chaehyun.lim@gmail.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1446804681-8873-1-git-send-email-chaehyun.lim@gmail.com> References: <1446804681-8873-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, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Instead of using rates variable, it is used as add_sta_info->rates directly. Signed-off-by: Chaehyun Lim --- V3: rebase latest staging-testing. drivers/staging/wilc1000/host_interface.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 72d2814..58f7668 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -4547,12 +4547,11 @@ int host_int_add_station(struct host_if_drv *hif_drv, memcpy(add_sta_info, sta_param, sizeof(struct add_sta_param)); if (add_sta_info->rates_len > 0) { - u8 *rates = kmemdup(sta_param->rates, - add_sta_info->rates_len, - GFP_KERNEL); - if (!rates) + add_sta_info->rates = kmemdup(sta_param->rates, + add_sta_info->rates_len, + GFP_KERNEL); + if (!add_sta_info->rates) return -ENOMEM; - add_sta_info->rates = rates; } result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));