From patchwork Wed Apr 6 23:10:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 8767071 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 876FC9F3D1 for ; Wed, 6 Apr 2016 23:11:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7B25201B9 for ; Wed, 6 Apr 2016 23:11:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BAA4B201C7 for ; Wed, 6 Apr 2016 23:11:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754466AbcDFXLK (ORCPT ); Wed, 6 Apr 2016 19:11:10 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:34716 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754383AbcDFXLJ (ORCPT ); Wed, 6 Apr 2016 19:11:09 -0400 Received: by mail-pa0-f68.google.com with SMTP id hb4so5263529pac.1 for ; Wed, 06 Apr 2016 16:11:09 -0700 (PDT) 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=DiCtPZT8S0T11ukfSIB8tPcB3tY02W/WX+iowQbS6o4=; b=mVGQihKJwpPSVThiQ14OXR8Ie8z4QZ2wLa97hzlDQafWUEWVnS0uGMwg1FU1Jumv8v mnQW0nUfOofBRLFfoGFhq237PQSe4QAGsabVYHDHWPyHdAfYXtK95YZoZfABk21kBPYz 19UjU1hUsg3ik2k60NP57tkDyQZGThzpezPIN1GaWbBFZ7MCZOqJhtGdd35B5CmF5L36 pYr0ryhaH9XcQFdMIT9g/HKaGH/ScwWwEuNtEJCY1czZEqDBTitwwDl2QrmrdXnZQEjl an2zEnO5urOKeJQBKa0gI/1GYjyWV+DDz4cuM8D/7Y3qcolV1ntf6psgC0/YedR975J5 ZuHw== 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=DiCtPZT8S0T11ukfSIB8tPcB3tY02W/WX+iowQbS6o4=; b=fOMrTPuV42hFpYqleXGqAhSsFLbdejnwfqcRxyTjADZ3uA7WrBm+ukrru2pH8sgTvj 6LTFm9oV37WFu5D+DZwU1bMyDJ0bGxiCGEXz9GJcijhpN1wvcBbY14PmSGtFSYCqvc22 GfGS7bPxIf17T8f+PZXddI7eDczpLy8ocaa+9yzB1xbSyUxIEt+QWtL6kTS5KIEb5vqD KwaqHvwl5A2nzq2KAdGwsd7p+k1Cpn3ij/aSEqyvBQrcWrlOkMLqxX6BPKy+cIxjA+5T 91T2jZ8EE6UyR2iicDUjoGm37B5SDAPNBrrtlOiKSxmdq55TrI/5XUL/eSF5+i1N4xJb YEZA== X-Gm-Message-State: AD7BkJI6y9PMUI+GoTqyNdbcH11R2+Xj54hrfavninqI6OUwsK/wVdWdu1o+5VB2DNUk3Q== X-Received: by 10.66.121.97 with SMTP id lj1mr74388495pab.51.1459984268688; Wed, 06 Apr 2016 16:11:08 -0700 (PDT) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id g6sm7282818pfg.15.2016.04.06.16.11.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Apr 2016 16:11:08 -0700 (PDT) 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 2/7] staging: wilc1000: change handle_set_wfi_drv_handler's return type to void Date: Thu, 7 Apr 2016 08:10:38 +0900 Message-Id: <1459984243-4689-2-git-send-email-chaehyun.lim@gmail.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1459984243-4689-1-git-send-email-chaehyun.lim@gmail.com> References: <1459984243-4689-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=-7.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_wfi_drv_handler 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 braces if statement due to have a single statement. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/host_interface.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 09e4ca3..ba472d5 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -307,8 +307,8 @@ static void handle_set_channel(struct wilc_vif *vif, netdev_err(vif->ndev, "Failed to set channel\n"); } -static s32 handle_set_wfi_drv_handler(struct wilc_vif *vif, - struct drv_handler *hif_drv_handler) +static void handle_set_wfi_drv_handler(struct wilc_vif *vif, + struct drv_handler *hif_drv_handler) { s32 result = 0; struct wid wid; @@ -324,12 +324,8 @@ static s32 handle_set_wfi_drv_handler(struct wilc_vif *vif, if (!hif_drv_handler->handler) complete(&hif_driver_comp); - if (result) { + if (result) netdev_err(vif->ndev, "Failed to set driver handler\n"); - return -EINVAL; - } - - return result; } static s32 handle_set_operation_mode(struct wilc_vif *vif,