Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp935440rwb; Wed, 28 Sep 2022 10:54:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM70kKPdfamZMd3/C++MNLuB2Y20ws1kNEm8UqQqnF4pfIEAI3VvL/Vkvcdvo15K7gogfsQ7 X-Received: by 2002:a17:90b:1b4c:b0:202:c05f:6e7b with SMTP id nv12-20020a17090b1b4c00b00202c05f6e7bmr11619690pjb.200.1664387690563; Wed, 28 Sep 2022 10:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664387690; cv=none; d=google.com; s=arc-20160816; b=khKVze/shOVr2891v0caPh2OFh0GX2RBajNWABxQV5QSQym5C0pp93Ysj/h/pPWZdJ O3Q9aXskYYXMn15CwWNsONsYsh2TSWhGIkTRkGlme96SS0AfrZegCF8I07NY1fqFvycA 8ozSw5b596uMw6UFZmkfeHiBYShCDF5nP84Yq5IbXAsMPMhLYWFRHAJUBjlHjiAby3Gv ulw6DS7y9sDGs/xYzGS1itbfGJpCpkMqXDuvYv0svvcYna+lDkvfTBFyDOsYRqPbllAI 2poSjdAJ9FEjB3s1i7e6HcGfC9gTIgysoje7DGKV8ig6IopHq5wCOUcHJSWloW4YeEbR fAHg== 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=bAT4lI1cS6DeEw/8Q0cGUzgW7gwK5qXIMg6NrWzIWKo=; b=lawBXbboWh6/5K/ogh9Job7V9zbivukqW8VYyZAPiZ2cv54HHtMG7FgTjUL+Rxx1wE 6UcL54gITRpOdFQ1hOvP+g45JvSWvztxhoIvmuv7UxgxQ/IH/7/yNNG/HPFKci68jU6i AjNsgA3sR78FAVD7v3Nm7XSu0YW9ufs0qJzHyKiUhEIKmP3V5khL5ko0DIeCznkFT4kn Hsu1hgceLP4eOuOUpnEuXTgbOEShKVIgLoycOuJV2Ciwpg/DZIvqpAixKGmAhLwrVy3v WCK7RAxjga5GuBNFbHjcQq9Ws6yQPgzk0L/gfzXfrw8nvrB5yPIkPl1AEcFToJenwhQA wNOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fEIfyz2l; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 139-20020a621591000000b0053e47fd7d0bsi2971359pfv.122.2022.09.28.10.54.38; Wed, 28 Sep 2022 10:54:50 -0700 (PDT) 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=fEIfyz2l; 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 S234491AbiI1RXf (ORCPT + 99 others); Wed, 28 Sep 2022 13:23:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234278AbiI1RX1 (ORCPT ); Wed, 28 Sep 2022 13:23:27 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 151AF7FE60 for ; Wed, 28 Sep 2022 10:23:25 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id z2so18202730edi.1 for ; Wed, 28 Sep 2022 10:23:25 -0700 (PDT) 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; bh=bAT4lI1cS6DeEw/8Q0cGUzgW7gwK5qXIMg6NrWzIWKo=; b=fEIfyz2lCaTo35Ue4OkF0Ce0XXDTMNKrW9uOD2H5Cn97v72XOAopWJnlWZxkrScF7d D1gfVWLXpX6mprk0QT7U0Y9ZfP2P5byBEQ32LQRkZYf/qDtSm4Rhhv50+gR8f68Yloue P6OJd3Ta24r6AREVrl6pKVKk8CfOvABnFByko0wbNtZgIg9EPm/Mr0pjBGWuL9QWoQfD r8sKcyhekFWOmI7Bag7qyThRdjrTXB7UhB97qCMr33ZoMFkw7rvZs3DxEGeWu9urmlJa JFMLNtGxIfqACdW/SXFNGNc5O6uVRS2m8mQJ/mePChfQ48grsZVQUTckhOhIxV9bHmxx UsAw== 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; bh=bAT4lI1cS6DeEw/8Q0cGUzgW7gwK5qXIMg6NrWzIWKo=; b=6naIbD4rIxaJACkjzPTXryUX5GkmllbuHq5lhwzUl0uCsUZ2SRlD/JFantSpEgcBMQ qcs4Xl9twBzN9/hWpU7yUhzJYEvc/2KptA4xSsn6SxIcjlDQyHvdt4cmrlm/albW4NNn mfXOo7qxLyTI+1O3M4qNGhW3A2NoKSp9IIdvDnX8isJw415rugfDs4q3u5du2HMQ711N uG4SMTjupZsrEyBuo1NSZlVr56W/qGvwQ8lcF/VdX+BfXA6REkGz9VI38ss2KO4PnvVp UdpdYJ0oD0ZgDsEIhihajZ8k5cM+NmbiDnhbKT3TYmeOVaVEraBrBzIs6XSWIpYb2k/E /WjQ== X-Gm-Message-State: ACrzQf1pqakT4Zp6SvSQ02QEALZNGushAH/cKFIOL27raWLOWPYTTSrW vmcpXcKd3uyM3TTKxf1zW6I= X-Received: by 2002:a05:6402:2694:b0:450:d537:f6d6 with SMTP id w20-20020a056402269400b00450d537f6d6mr35433802edd.344.1664385804315; Wed, 28 Sep 2022 10:23:24 -0700 (PDT) Received: from localhost.localdomain (ip-217-105-46-158.ip.prioritytelecom.net. [217.105.46.158]) by smtp.gmail.com with ESMTPSA id lb6-20020a170907784600b007306a4ecc9dsm2725063ejc.18.2022.09.28.10.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 10:23:24 -0700 (PDT) From: Nam Cao To: forest@alittletooquiet.net, gregkh@linuxfoundation.org, dan.carpenter@oracle.com Cc: namcaov@gmail.com, philipp.g.hortmann@gmail.com, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: [RFC PATCH v2 1/4] staging: vt6655: remove redundant if condition Date: Wed, 28 Sep 2022 19:21:47 +0200 Message-Id: <6a4028a10308d3abcd31421a28e760fc3ca61a72.1664384503.git.namcaov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The function vnt_receive_frame always returns true, so checking its return value is redundant. Remove it. Signed-off-by: Nam Cao --- drivers/staging/vt6655/device_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 56c3cf3ba53d..21d10d9fde47 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -832,12 +832,12 @@ static int device_rx_srv(struct vnt_private *priv, unsigned int idx) if (!rd->rd_info->skb) break; - if (vnt_receive_frame(priv, rd)) { - if (!device_alloc_rx_buf(priv, rd)) { - dev_err(&priv->pcid->dev, - "can not allocate rx buf\n"); - break; - } + vnt_receive_frame(priv, rd); + + if (!device_alloc_rx_buf(priv, rd)) { + dev_err(&priv->pcid->dev, + "can not allocate rx buf\n"); + break; } rd->rd0.owner = OWNED_BY_NIC; } -- 2.25.1