Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3060280yba; Sat, 11 May 2019 02:52:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwchWIo/RBZtmbcKgxEwF5EzHY8HJDOOipfrFpYNcBhD05Jx84mSYsBNnMu0uBbPh77lNQw X-Received: by 2002:a63:7413:: with SMTP id p19mr17136313pgc.259.1557568357333; Sat, 11 May 2019 02:52:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557568357; cv=none; d=google.com; s=arc-20160816; b=BO0+FSZS2zJhzVz62PUMiJB7SA+KZNkxZivqhIF0C2wlf1h8dnpZwXmZFfVvqqBzzb oRfAnMDjl0y9T20jKiOVezgHnI2UBGhWFEiLpkPeMJwNKjxYYOm7wq/fmXQ/J3/rqLql 5rj20eJalMZ8nSbSYMqCayIXEWJCJxHoT4MvGs4TejPofGWqRISyIelY1vEyE8+h22KW zTcka/B+sLCo+hx+wfRHZbcZAGnrzCo2PREXrRy1wrtPCDoB1KK053lR0IVu8DiWJS8q 8fcXz42erB/WWz7NeDxfR25comdZr/JXir24/wqlJNQr2qvh2Iu75rlxjAR8+nHGSwPz McNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=JoxPpyQyOu22hWp5htaLgYiM2luFFOZuNTOaxrJUw8k=; b=0j2yDLVXERFcH8YAkRQ8/Q7UtEu/w6LJMSrH4v1pI1B6rAyan0KXZajNb/haVmkENV zibQOxGuKZhVc4kEpebZQ3CcMbIV3X8v3Dm2IwCtx3NmwzGWGGOOOhQb1XQzmkhhUkEl FM8hHudHzRDithC8iJc65chq6S44I/EKXCZqOBmQUy3CWweoB387SocJTGrUgLjkS60h IP2qOg2L9G5t98qocfxanmEFvJMogI6AC0ScRsBnukV1lzWDCOQfld1Yy/Mk7geVK38v KeJQxKd/yH+A3rj3wEYjFWRq0EpyOCl7sh/Qs3iPuu393wE3cIJINR0qVwL03D0WYFoo 7Vrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CQfpS9tm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12si11564888pgh.191.2019.05.11.02.52.21; Sat, 11 May 2019 02:52:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CQfpS9tm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728507AbfEKJtH (ORCPT + 99 others); Sat, 11 May 2019 05:49:07 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:41813 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728424AbfEKJtG (ORCPT ); Sat, 11 May 2019 05:49:06 -0400 Received: by mail-pl1-f195.google.com with SMTP id f12so1951978plt.8 for ; Sat, 11 May 2019 02:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=JoxPpyQyOu22hWp5htaLgYiM2luFFOZuNTOaxrJUw8k=; b=CQfpS9tmF4EiQPwD2Cb5zP3Oexv/pRbqqI5uEYdXhJyeFZ7cbf8Q+VakC6kJMu7qpF gSyLkcyMFt7u9pauMfdp4xBE9XsQQuYGbaYEOGHmKRKCKFjqO5grhDch8APUv5uKIvln tM0jm78HUaxtLsDgHazegGnz5LA/8vd79+62ARsCKv+1m1P5I378KNbiS4P41JQwX/C7 B6nFc9e8f8pWTRR4l6MHPEPYPJPAWVx3RaRjgkQpma7e9Toptn5wvOAFVry0BLn1DW9S ouhlIqXXMLxGsIP7+3MEw6tKyhULNWXYhgNA8UVTi8lxN+Z9642pS6MkdaYGivegspy1 8jNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=JoxPpyQyOu22hWp5htaLgYiM2luFFOZuNTOaxrJUw8k=; b=mswuqp9NZHFf4xBaL/ufferKXdF0yeNiORcQd6dCDeDEb8zUq2C78OZ++ja49yEF0n sZnq2Dx4zvTij8+vFo9K7WqDV3T5JZvELkSKi579bhlejbo3rCBoXpTO3TKgi+hYsW3B gRZ7MIZpTmnYE7rCSosmBF1cDHxR0Owgj0CxApK6e3Dcoa4sewdlY7vwRWlSWP/JhbGS SaMEaWzIUZ9ZYiHopHyUkW+heQqemSjkt0Fj/WzaowquFXHabM3PUMTomfutPIvpM/8w s92GI911iNdEpBurMKW5QR6KkdqEewLhSKpKqn1bLBL/pDbh/CuOl63SDBJgVkFNJLgc Kyhg== X-Gm-Message-State: APjAAAVUHXyvI3JSOBLuNEYEYVoOjpkwXJaX8URg1/8e9pMHUm/vg//t v3r30mg2NKW3nvPXNBnKxXk= X-Received: by 2002:a17:902:7895:: with SMTP id q21mr18070928pll.73.1557568146254; Sat, 11 May 2019 02:49:06 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id k64sm27220158pfc.97.2019.05.11.02.49.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 May 2019 02:49:05 -0700 (PDT) Date: Sat, 11 May 2019 15:18:59 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Tim Collier , Hariprasad Kelam , Chris Opperman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Dan Carpenter Subject: [Patch v2] drivers: staging : wlan-ng : collect return status without variable Message-ID: <20190511094859.GA21232@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As caller rdev_set_default_key not particular about -EFAULT. We can preserve the return value of prism2_domibset_uint32. Signed-off-by: Hariprasad Kelam ----- Changes in v2: - remove masking of original return value with EFAULT --- drivers/staging/wlan-ng/cfg80211.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index 5dad5ac..4018fc5 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c @@ -231,12 +231,9 @@ static int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev, { struct wlandevice *wlandev = dev->ml_priv; - if (prism2_domibset_uint32(wlandev, - DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID, - key_index)) - return -EFAULT; - else - return 0; + return prism2_domibset_uint32(wlandev, + DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID, + key_index); } static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, -- 2.7.4