Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1319521rwn; Thu, 15 Sep 2022 13:56:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6X4KldG4/HmykR5mZu2LbqUzc8eH+UmLuTajlYAztG4nsqthHcBEEatxau7ywkxv1OYBO5 X-Received: by 2002:a05:6402:43cc:b0:451:129e:1b1e with SMTP id p12-20020a05640243cc00b00451129e1b1emr1419072edc.258.1663275404600; Thu, 15 Sep 2022 13:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663275404; cv=none; d=google.com; s=arc-20160816; b=MB3p+lffC6SpOl4rZLT6X+R/92QvYkBFdDlhocXFMnhFiK6m26fUF+e8MYCewpBOop MYaubZZ5TF3+g3qa8MVUmhgEB+ksBS/rw7KXaXjQ8cCOmJ7VBBfXAlWuWaf1ox6uJ0GA QZfas2o8W2jZMbgBhgnBe5BbyejJnuPOuTNacFgvjiS8CxP8QV/qGwMxWzjWbO92PeAe 4dEF8mImE0UZHKC2GmjzhtxnkmUOFiar+x4Jw6RdCz/SJU5jtDaP/TMSkh1f98HxTjlZ YBkOggK28cOh5j6rnbMnzHtLSLl50IwzB2IC99q+EFDdWg7coPDc9mBuDls440JwJ0ic HcQw== 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=v1YzXJ4RvumAwk7bF6dhyR+VAPv7fcA5m5FBuJy0qIY=; b=yWaXRGU+TJ7zzSX4QQxQ9P/JDR3fIc9Ro+o0hR7gBkfqjI5oU7kCWNXagfFSEOB1S6 Mh3P6Sg3DAaxXfBMviq0P3gxu0L6FrFdf4b3wrNNNAPzl3NS1ciBEbQIQKQhgMNlzW2i ZaAq+z8QdHJh6uA/HGbKmrGqDfqbUOu0A3HbnSSIcAfjaOPzX/saykhCCSPkm4bhoJsB lMMkozljgWKlW1JxNM1hpzL1zZAbu48mNdt5Lk0gfwLw6ZLY/mqkP3JXz7q669xQsz3i doctqmfYPfDIJxsdqX+TZrQy/1pkeuxGtSc4sBhRqN8dSUVie9VWDyKWvKST7sBH8cTj T/gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qPH+Eslm; 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 jg28-20020a170907971c00b0077e04f856a2si5212045ejc.541.2022.09.15.13.56.19; Thu, 15 Sep 2022 13:56:44 -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=qPH+Eslm; 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 S229658AbiIOUaE (ORCPT + 99 others); Thu, 15 Sep 2022 16:30:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbiIOU37 (ORCPT ); Thu, 15 Sep 2022 16:29:59 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63A5D30F5A for ; Thu, 15 Sep 2022 13:29:58 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id 13so15731325ejn.3 for ; Thu, 15 Sep 2022 13:29:58 -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=v1YzXJ4RvumAwk7bF6dhyR+VAPv7fcA5m5FBuJy0qIY=; b=qPH+EslmJox4jB/AYeCJVyO2sQGqb2P7YW0rUcwI0rqV6lVGQ0zsfxckTccO+35RwJ D54NAIXUhnx7L7+nGaVxxv/YcyCGx7zWRSQX/OQmQEcBb/zUyF/9gMZQnD1kvz9iOf/3 QU7WSvojdZ4m9nGT/BwQC6Ccxci9CIg29PqKNyiwXxKVXkJOrYCS2ulm0PvBVxsqN+1c 7cPXwm05Gr27KWuIEnv4VON0gniO/kzAXrAI3Q95bZyjILHTlvunb/22gFl3YPJ1mrfR uMV2GjSbArOlKqR2BEweVwf76cVk3ig9sQ1CH3tXZv4JnX8gTJMf7xlfdIaG6w7HJa9p lV5A== 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=v1YzXJ4RvumAwk7bF6dhyR+VAPv7fcA5m5FBuJy0qIY=; b=d5qPa+B9/3gKXXj+Rqs6WAiwHhCbmpHKmjvuOAkoo+ZdM+OOPcZDkehVanHtZ9EZgT bATS09DCkMahetIGisbWtEtuYNUL8ZhGVQEqCNth3FscX8ODSKsrrOfWvx0w6KBfnkFu AMyLbWlQ0AEkCD69FuXGgg7k46nTgq81q4snPXQI8H+y36XAK9OQEdLl/ONN5yiwZ+4Z eS3zpag67hUAAqQNJMYIPLtpRz3D1Zu2nqIcYIiX7+5LRKnuHZ0IIpcrhAMqtEhjx6SV qrACrte4Eq65LvYOjWZx7dBlxMF552JDOaVUl99neq6ZuWFbPNW1ldTxa1rROxMUfX6h c70w== X-Gm-Message-State: ACrzQf3YC/fKXRqCoLuN/KtKRZiycX8Q+JnurVRQ0chEaKa000/FsVDr fdDMyC/eGyUdpYQd71zDamQ= X-Received: by 2002:a17:906:ee86:b0:741:89bc:27a1 with SMTP id wt6-20020a170906ee8600b0074189bc27a1mr1133421ejb.725.1663273796925; Thu, 15 Sep 2022 13:29:56 -0700 (PDT) Received: from localhost.localdomain (ip-217-105-46-43.ip.prioritytelecom.net. [217.105.46.43]) by smtp.gmail.com with ESMTPSA id ci25-20020a170906c35900b0072b3406e9c2sm9607295ejb.95.2022.09.15.13.29.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Sep 2022 13:29:56 -0700 (PDT) From: Nam Cao To: forest@alittletooquiet.net, gregkh@linuxfoundation.org Cc: namcaov@gmail.com, philipp.g.hortmann@gmail.com, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: [RFC PATCH 1/5] staging: vt6655: remove redundant if condition Date: Thu, 15 Sep 2022 22:29:32 +0200 Message-Id: <1e26ece88d2fbf6dafff8694d70a8e52dfb3c077.1663273218.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 04d737012cef..79325a693857 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