From patchwork Sun Feb 5 08:05:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 52883 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1699048wrn; Sun, 5 Feb 2023 01:09:42 -0800 (PST) X-Google-Smtp-Source: AK7set+QIvckCrq5tAQ4CypKiaeGgDnWEf6w9ibkHObu7dNAeOmoflpSyNRdIBxgghOGwuiih/us X-Received: by 2002:a50:9f26:0:b0:4aa:a216:c15 with SMTP id b35-20020a509f26000000b004aaa2160c15mr4246825edf.10.1675588182749; Sun, 05 Feb 2023 01:09:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675588182; cv=none; d=google.com; s=arc-20160816; b=a+rvk9WUtVwEKyx8mPbRzS69g1veCdwW731kzc4C4DXyuVdm2+lRgcByWumpRCSQg/ 0CXhCGdDetcaIYVHQOggAtwY9dox43Dq/1M6E4tydpvOoYXAYuZJAgymQRuzb0dQolQJ zhjUJpKOJmX7flx3Rks4WCOWvUmHlLvBlqyR/VT8SmLwUM7a62sWzwyZCCeH0UbeWPNT HARXDoHT0s1N0f9Zt/2RozBbF95P6yGGPXwoOFjoLyoQc97DmnCy9QL1nMfZRtxvvjfN n5PFBrcBw+NxvgvGpkdPpl/jQblZq8MOf+HZnZ4MyWOxlhObegMa5GWRbjsbn6HSryAc V8yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2qziGg2cSFU5vnpf88of+jda4n8gpF/R4RPkurqZxdw=; b=GOhZxPTA2GDK7pOEg6eG8MEokqXkvTr8Brda7m3OvLY0ogh0EEkNgbRe/+dP6T8tlW MSgzHVaMb6DSYcdYGeW48/yaaTJ0pLgAQIufvYwtEnKr4N/JjNCQBJLmXB5sW9x18s8W nluVYVd4LVuLcjkwTVwBJ3TAI2MPd1eyc0p9Jr/4W9mC4soJqR9b+CldqvFx80htmb4Q JvML8OYHGBnYp0rNtCygUb7tA9UAsKfuRUqDsGs73w/R2t2ObIRZYQ9sZIEKlnYZoIa5 ulE667Qx4aOIrPsdSMaa3DzTRhpcpHu1ejLHy3URcouqjh7mUHY6olg6uWLLfBiNmubm Hbdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Bq4lNcFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m1-20020a056402430100b004a99cdae8b5si6313337edc.122.2023.02.05.01.09.13; Sun, 05 Feb 2023 01:09:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Bq4lNcFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229533AbjBEIGS (ORCPT + 99 others); Sun, 5 Feb 2023 03:06:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjBEIGO (ORCPT ); Sun, 5 Feb 2023 03:06:14 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CFF521A3B for ; Sun, 5 Feb 2023 00:06:13 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id x9so799257eds.12 for ; Sun, 05 Feb 2023 00:06:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2qziGg2cSFU5vnpf88of+jda4n8gpF/R4RPkurqZxdw=; b=Bq4lNcFeMqwx8VXJ1FRr0MF65ZNSu2CaIR/OqWDdfZ2tSFEE9s3VLCGICyvbRhk28q pwpj5lwOiVIK8DV9TEEWHy/5UaSQNXqezvNwQu5ibuXrgdVY14ajHD9FLUq1XjQLkPlt AS6MRm9t7lERH1hjm48I3qrXq/RohGd9I3/cBfbgA2ieDaN7I9GEa021YiyKM5ARYabv v3uy9g7If4rzB/dXmGxS54YHjdUja0kNaP+guHOKyQgnS8leg0xGZoLIOTED73/g7rPY /LryiHeO6O+SV4Tc9kDirM38MW7LohrEUUQdaIm823ule0ys3tG0pd8RHIQdQQYHdXy9 8QnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2qziGg2cSFU5vnpf88of+jda4n8gpF/R4RPkurqZxdw=; b=IQn0MnkK/xE4je0xh8GNZGakoQFeVdh99LDco2DS8P6OZFFq/zHWgJ2XtS8TANk9La rmwaHnfUMKG5Mvpjs0hcZdY7g3LyXyhBtp8EKkSFL8zEW7Z8SQXcMNnvwhzkhemo/IWE +alSxpcKrHMkLYizjrIlx90L9Mfi6sqdpg/ZCyHUXr6bEBA6JpTKDPlofHtoIJyHC5qP RLl/4kYCZHqKiY4d8xwOO69C+LegOgKZnP/FU+XEQ5VQKKd632AuFkNt3XvHxuomwAlU iBYxAM3Gf5BI82AYdC1sFZ0UahJBySwvs+eH/kw3TaZ0wUyOZu3vMEBxeOvyBdL/0+Wv 3v1w== X-Gm-Message-State: AO0yUKXismy/AkoKkzJI48cCrn50kiQgYlRpn9otO5ETKx387wUuJoQa NgF4KVizjHjB2it0F3RNqm8= X-Received: by 2002:a50:9f26:0:b0:4aa:a216:c15 with SMTP id b35-20020a509f26000000b004aaa2160c15mr4058858edf.10.1675584371450; Sun, 05 Feb 2023 00:06:11 -0800 (PST) Received: from localhost.localdomain (ip5f5abbf9.dynamic.kabel-deutschland.de. [95.90.187.249]) by smtp.gmail.com with ESMTPSA id q10-20020a056402518a00b00463bc1ddc76sm3441379edd.28.2023.02.05.00.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 00:06:11 -0800 (PST) From: Michael Straube To: gregkh@linuxfoundation.org Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH v2 1/2] staging: r8188eu: correct error logic of rtl8188eu_init_recv_priv() Date: Sun, 5 Feb 2023 09:05:58 +0100 Message-Id: <20230205080559.8319-2-straube.linux@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230205080559.8319-1-straube.linux@gmail.com> References: <20230205080559.8319-1-straube.linux@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756981554534557408?= X-GMAIL-MSGID: =?utf-8?q?1756981554534557408?= Convert the function rtl8188eu_init_recv_priv() away from returning _FAIL and _SUCCESS, which uses inverted error logic. Return 0 for success and negative values for failure instead. Signed-off-by: Michael Straube --- v2: no changes drivers/staging/r8188eu/core/rtw_recv.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c index 631c500dda42..70d43c10e53d 100644 --- a/drivers/staging/r8188eu/core/rtw_recv.c +++ b/drivers/staging/r8188eu/core/rtw_recv.c @@ -38,7 +38,7 @@ void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv) static int rtl8188eu_init_recv_priv(struct adapter *padapter) { struct recv_priv *precvpriv = &padapter->recvpriv; - int i, res = _SUCCESS; + int i, err = 0; struct recv_buf *precvbuf; tasklet_init(&precvpriv->recv_tasklet, @@ -50,10 +50,8 @@ static int rtl8188eu_init_recv_priv(struct adapter *padapter) precvpriv->pallocated_recv_buf = kzalloc(NR_RECVBUFF * sizeof(struct recv_buf) + 4, GFP_KERNEL); - if (!precvpriv->pallocated_recv_buf) { - res = _FAIL; - goto exit; - } + if (!precvpriv->pallocated_recv_buf) + return -ENOMEM; precvpriv->precv_buf = (u8 *)ALIGN((size_t)(precvpriv->pallocated_recv_buf), 4); @@ -64,7 +62,7 @@ static int rtl8188eu_init_recv_priv(struct adapter *padapter) precvbuf->reuse = false; precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL); if (!precvbuf->purb) { - res = _FAIL; + err = -ENOMEM; break; } precvbuf->adapter = padapter; @@ -94,8 +92,8 @@ static int rtl8188eu_init_recv_priv(struct adapter *padapter) pskb = NULL; } } -exit: - return res; + + return err; } int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) @@ -141,7 +139,8 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) } precvpriv->rx_pending_cnt = 1; - res = rtl8188eu_init_recv_priv(padapter); + if (rtl8188eu_init_recv_priv(padapter)) + res = _FAIL; timer_setup(&precvpriv->signal_stat_timer, rtw_signal_stat_timer_hdl, 0); precvpriv->signal_stat_sampling_interval = 1000; /* ms */ From patchwork Sun Feb 5 08:05:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 52882 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1689583wrn; Sun, 5 Feb 2023 00:34:08 -0800 (PST) X-Google-Smtp-Source: AK7set+6CVW1erH1RiAAoN7+4Sgo4DjsVg7H8FY24KCyg79m21ikBgZoTgcfU6/+o+1zaCMPv8fv X-Received: by 2002:a05:6a20:c704:b0:bc:d39c:bff2 with SMTP id hi4-20020a056a20c70400b000bcd39cbff2mr16851473pzb.23.1675586047858; Sun, 05 Feb 2023 00:34:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675586047; cv=none; d=google.com; s=arc-20160816; b=thIzvONxnWKk1FTzkHGVCS1uPbGX1zXuGUTFeDJdm0IxnVDnwM8WuIIemPLUMIqJz7 Y6BHSFDQE2kwRWlnur0rBMGLQWZtkF6ejbj7YMJtc1PxZgJ3citfU8pPxzpUKFwCrBPY 21upy9Nr+we9Kz3uqlVX6SRc3uwDRy+c01l2UvCw38OyOTuCNZbNGAnBN3AxOiRDn9AT 2SrHzJRZcngQG1SQGzr7erMiVb7zKhMiceyI0eWJT+EggqRyLaFyAbRvgQfeD1boqWnl DXI+g/R/FQNGRV0XJb4PPpV+sps4z6lmMivxNFeE1QZ0yMfMF+GJMTI3ry8rxOJQ4c+f O76A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Q/FJrVLcAKW7dc7MqSQRF48wmArQiFUNesAGFLiITg0=; b=c12m4z747fZeYwsejGCa+MvmPAAzSp/xTQIU1Kpjmct0buwaBd4z0rDbyBXgxhcUvA ixtvPM1XX5/cVTAHW+3lZEi6ijNVd4+jMFbFPFXtJAmW/Wd1OLIPuEM41ndzyyD0My0E M4xlEanxLTN+L96FpGaibk9aRIrljcW+69ea3WlMEMJ3Gb6Sy6N8euE3Z6/Y2WH6PUFV /S4jUTNxwW+yRmDR9fT0QKQUGoC2yJTWbOaA7iJAbjBrGrO8cPguf3Cvs5HjfTD/A32G ITfzB9QPo/cLEQUwWNEbNrV1I5hDINULLQYwe+n5FCISzuiBrFRqtlvJf1p8UolYl0wc gvkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="I0LnG/Ai"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a17090301d000b00198e4bd86besi5324184plh.506.2023.02.05.00.33.49; Sun, 05 Feb 2023 00:34:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="I0LnG/Ai"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229525AbjBEIGV (ORCPT + 99 others); Sun, 5 Feb 2023 03:06:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjBEIGO (ORCPT ); Sun, 5 Feb 2023 03:06:14 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6258F21A3C for ; Sun, 5 Feb 2023 00:06:13 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id u21so8850044edv.3 for ; Sun, 05 Feb 2023 00:06:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q/FJrVLcAKW7dc7MqSQRF48wmArQiFUNesAGFLiITg0=; b=I0LnG/Ai2sOlueHpvhYXWwR065xy3BZSzwWts7twB68GI8hNAKMhlV7ABQid65uXmd 0H2VWsvE1MHIWvm8uJ3bciD6f2rP/Y+x1YMLaH4FzNKNux+E8r1L6d3BiSLui30BUXQx vXkM5i0OSH+9i0j3zEWLbOa1Pjpyv152qjRPUzCfEYKesCxwLrvimA0Z4urxZzBxYsI0 hseZt1gqTfrVfvMAlvAhcnox69pH7OIy0nB6o0raUbzU0/8VgLLbvMAi0syJ0f364V4d QQDbv+SWG5JgJgMMZPAHRqHI4kLNi5AvQx4OHkb11bg6AzgiaSKkKMR81ZOGRbYjb77+ /VXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q/FJrVLcAKW7dc7MqSQRF48wmArQiFUNesAGFLiITg0=; b=TGuOUlEXFg+WzOyuhV/4u784SD7k+IyLQl9Wq//Z8d/LP9nwCOhmW8vy7f+iThpA3M MFQYXVrNkZvWDQLKONHe1gM4Gl8AM1rAtQEDpMQugQnkzfywt/7aQZOIGPH7fbsdqmTi AIYLfyH8H8D7J5xB0mEZZ+9lPudV/WftAERxUafOtPXXcq3BkwwSbeN7V8SwBrG/wriy ZP72h3rD25SV/bV8lG0OuNjnj++n/XZGmEj4Hf2Xj5+e2oTNirGQcQQQ2fY5pGH4L5YJ DfRgdJtfjK1L5LZWbIO2LG+/4rjQOJERxYIn/XZtlO1hnWzcdJEiDSlApaiVOSXQnSMu Wntg== X-Gm-Message-State: AO0yUKV1LmsErCIzJfs4D9eATn3qENxat6gDBm/kIMLQAmHzWplgKe1G kIF3HB7JpAxhh7V8JqzAwBM= X-Received: by 2002:a50:ab4a:0:b0:4aa:a7c8:67a0 with SMTP id t10-20020a50ab4a000000b004aaa7c867a0mr1201265edc.12.1675584371990; Sun, 05 Feb 2023 00:06:11 -0800 (PST) Received: from localhost.localdomain (ip5f5abbf9.dynamic.kabel-deutschland.de. [95.90.187.249]) by smtp.gmail.com with ESMTPSA id q10-20020a056402518a00b00463bc1ddc76sm3441379edd.28.2023.02.05.00.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 00:06:11 -0800 (PST) From: Michael Straube To: gregkh@linuxfoundation.org Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH v2 2/2] staging: r8188eu: correct error logic of _rtw_init_recv_priv() Date: Sun, 5 Feb 2023 09:05:59 +0100 Message-Id: <20230205080559.8319-3-straube.linux@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230205080559.8319-1-straube.linux@gmail.com> References: <20230205080559.8319-1-straube.linux@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756979315723155437?= X-GMAIL-MSGID: =?utf-8?q?1756979315723155437?= Convert the function _rtw_init_recv_priv() away from returning _FAIL and _SUCCESS, which uses inverted error logic. Return 0 for success and negative values for failure instead. Signed-off-by: Michael Straube --- v2: Removed the initialization of the variable err since it's not needed. drivers/staging/r8188eu/core/rtw_recv.c | 17 +++++------------ drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c index 70d43c10e53d..fc7568cf948b 100644 --- a/drivers/staging/r8188eu/core/rtw_recv.c +++ b/drivers/staging/r8188eu/core/rtw_recv.c @@ -99,10 +99,8 @@ static int rtl8188eu_init_recv_priv(struct adapter *padapter) int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) { int i; - struct recv_frame *precvframe; - - int res = _SUCCESS; + int err; spin_lock_init(&precvpriv->lock); @@ -115,11 +113,8 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) precvpriv->free_recvframe_cnt = NR_RECVFRAME; precvpriv->pallocated_frame_buf = vzalloc(NR_RECVFRAME * sizeof(struct recv_frame) + RXFRAME_ALIGN_SZ); - - if (!precvpriv->pallocated_frame_buf) { - res = _FAIL; - goto exit; - } + if (!precvpriv->pallocated_frame_buf) + return -ENOMEM; precvpriv->precv_frame_buf = (u8 *)ALIGN((size_t)(precvpriv->pallocated_frame_buf), RXFRAME_ALIGN_SZ); @@ -139,16 +134,14 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) } precvpriv->rx_pending_cnt = 1; - if (rtl8188eu_init_recv_priv(padapter)) - res = _FAIL; + err = rtl8188eu_init_recv_priv(padapter); timer_setup(&precvpriv->signal_stat_timer, rtw_signal_stat_timer_hdl, 0); precvpriv->signal_stat_sampling_interval = 1000; /* ms */ rtw_set_signal_stat_timer(precvpriv); -exit: - return res; + return err; } static void rtl8188eu_free_recv_priv(struct adapter *padapter) diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c index cfc24420e70c..4130e8fe2952 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -482,7 +482,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter) goto free_mlme_ext; } - if (_rtw_init_recv_priv(&padapter->recvpriv, padapter) == _FAIL) { + if (_rtw_init_recv_priv(&padapter->recvpriv, padapter)) { dev_err(dvobj_to_dev(padapter->dvobj), "_rtw_init_recv_priv failed\n"); goto free_xmit_priv; }