From patchwork Tue Feb 16 08:39:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 8322661 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1CC8FC02AA for ; Tue, 16 Feb 2016 08:40:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E8DF202A1 for ; Tue, 16 Feb 2016 08:40:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A6AC202F8 for ; Tue, 16 Feb 2016 08:40:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752379AbcBPIkG (ORCPT ); Tue, 16 Feb 2016 03:40:06 -0500 Received: from mail-pf0-f180.google.com ([209.85.192.180]:35302 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754153AbcBPIkE (ORCPT ); Tue, 16 Feb 2016 03:40:04 -0500 Received: by mail-pf0-f180.google.com with SMTP id c10so103493718pfc.2 for ; Tue, 16 Feb 2016 00:40:04 -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; bh=JTzf2zbRuyW7WUtZcQk+JlJfQi0hDU5TK3iUCnOLHEw=; b=KAs+YdHJkigHxiffX0BD+xoAUp0w/thRX70WDC9NjDzhOqWmneXrUC/g3uSQ/p48NG gDwYGzO1kEZcgLC1kCy1E1ZuZrYzi9icRELu7hVHzszZo5LTtQnhkmf/sMjNzZIPjRKd bh0xM7vbtwBTPsYFulL8I5BhDV3ib8cxAy70rzsSYy/FQfwNJ/s2CFv96VkHBZxSdEwZ eY+98y6AZXMvulnEzbIPxL8C8IzXnlkdz1+ZOMuVIqLW4ASdvGumhqtHgkkRMr0RPfCw Hr2SrZ5K3GZOvaQNP53nnskzwZK4+p2TgrdQscTC/B36itsxR3cod4l72WD404N1HIcG xvew== 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; bh=JTzf2zbRuyW7WUtZcQk+JlJfQi0hDU5TK3iUCnOLHEw=; b=MwHIx/4tBDM8ImKqRYMbsEFdcYQSvW3The0ENqY0Ce2o/akENoPlH3JMfxjCF+vmJI NX4+ekxqfs5M4IQonTrNr4AClegorqMdMltBWW4N2VNHdm5eV/Z7YnahGxgjRQv7Dqxz S7Oq7qf0NuQj+WFYC9dcniSv+Akcbn4l7QYM24ZBkZvf08df6LlBahWmu3QryYC8nCiW Mh5vbgdQaoxSdbAEVVv7/L+GHMz+VcYk+NJSHTvh8OL8xJdPyiSV0ukFW+RKcvM6m+dp 0fEZ9NL+iBq8H9heN1D7uYkhN1+kbmGqriKJHAoLHRicUvzQYItUWLDdzMx67jOkq8WF m2NA== X-Gm-Message-State: AG10YORIRduigqjpzLx/7RIlJy7Hm5ROt8A6QCRxAu0PZXxjay3sAyYduG+mywolmnv/iw== X-Received: by 10.98.19.12 with SMTP id b12mr29028319pfj.29.1455612003749; Tue, 16 Feb 2016 00:40:03 -0800 (PST) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id s197sm43783511pfs.62.2016.02.16.00.40.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Feb 2016 00:40:03 -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 1/7] staging: wilc1000: handle_set_mac_address: remove debug message of kmalloc failure Date: Tue, 16 Feb 2016 17:39:49 +0900 Message-Id: <1455611995-28773-1-git-send-email-chaehyun.lim@gmail.com> X-Mailer: git-send-email 2.7.1 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 There is no need to print debug message when kmalloc is failed. This message is redundant. The code already show us that kmalloc is failed. The brace of if statement is remove as well due to have a single statement. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/host_interface.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index d1eedfb..579b90a 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -431,10 +431,9 @@ static s32 handle_set_mac_address(struct wilc_vif *vif, struct wid wid; u8 *mac_buf = kmalloc(ETH_ALEN, GFP_KERNEL); - if (!mac_buf) { - PRINT_ER("No buffer to send mac address\n"); + if (!mac_buf) return -EFAULT; - } + memcpy(mac_buf, set_mac_addr->mac_addr, ETH_ALEN); wid.id = (u16)WID_MAC_ADDR;