Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4373675pxb; Tue, 2 Mar 2021 13:32:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyriACb+J7xU2h28hc+8mjLDNdiF7ucKi50+IV1Uho4HHb8aVX7Oduxf5ISz+qf3sSwd627 X-Received: by 2002:aa7:d8da:: with SMTP id k26mr22611931eds.364.1614720775501; Tue, 02 Mar 2021 13:32:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614720775; cv=none; d=google.com; s=arc-20160816; b=HbZ3jBM0TneVTTztyd22+8X6+1mxVpfOpJ/aW9sPXCgw/UKab5Lb26ADpIyfzFrFeb rxDslAqpbk1HodoAzHyV2j1j2xzYa5uxDOI4t5VCzzjv8JX36BDJHY/kGTt7C2vh6//K ejDNzHqAoYBouhle8Jv8ZXvl37WF65uPKknqrlJ3TD0n8vltx9CfWNvV9uFWxjSbFxSP wdWXY8f8e9d5uL7HvDSttcDEQ4uRUArX4kVGoNKa9E5pIH3F5gvOWBjwAVSQ6HImY9Jn RAGjs9Bq7jh0UShiXPaQvnhDgtLmXr85NpUYdTsmLn9KLwogQz7hqPR52qk989gJUJQE IoHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=l/gtH+BrAKN9Txm4kg8m5WgQqyv+j8Wslf6p3vyRcn0=; b=Ap2kMjngYg9aVD4CfB7Hy2qS5Pmh2oahHsLJYho3P7AtcrFQJa/zSDAyarIWn/Dnc7 SdmFOe3BKMv2JVJzxj+lIyAMld06PsS4FUOCvQGHQkyPLIA0WZPGcIg4rfn48M+L6hEc rPc2Veqc1bsOgI6m9mAnzU3h5QCXUdGgI4apS8oj+MHG/DqJ+TlscjVTrw2ZxElee21c UqAKjbB8BPJANbNx2MOtIvlUL7uxWkYreFM+ZzHhohiS6wBnZkuQkcmWYCtZummrxa8v 7SverwhzGxnuIJzimTSb0Zr8Wb7ED2fhh/TPETYISrLfNttAPabDfEkamJRO5lqo93n0 +oHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mb25si13895207ejb.357.2021.03.02.13.32.32; Tue, 02 Mar 2021 13:32:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382557AbhCBJjx (ORCPT + 99 others); Tue, 2 Mar 2021 04:39:53 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:60866 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1837993AbhCBJRZ (ORCPT ); Tue, 2 Mar 2021 04:17:25 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R961e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UQ4ApPR_1614676600; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UQ4ApPR_1614676600) by smtp.aliyun-inc.com(127.0.0.1); Tue, 02 Mar 2021 17:16:40 +0800 From: Yang Li To: robh+dt@kernel.org Cc: frowand.list@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] of: property: Remove unneeded return variable Date: Tue, 2 Mar 2021 17:16:38 +0800 Message-Id: <1614676598-105267-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch removes unneeded return variables, using only '0' instead. It fixes the following warning detected by coccinelle: ./drivers/of/property.c:1371:5-8: Unneeded variable: "ret". Return "0" on line 1388 Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/of/property.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/of/property.c b/drivers/of/property.c index 5036a36..2381695 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1368,7 +1368,6 @@ static int of_link_property(struct device_node *con_np, const char *prop_name) const struct supplier_bindings *s = of_supplier_bindings; unsigned int i = 0; bool matched = false; - int ret = 0; /* Do not stop at first failed link, link all available suppliers. */ while (!matched && s->parse_prop) { @@ -1385,7 +1384,7 @@ static int of_link_property(struct device_node *con_np, const char *prop_name) } s++; } - return ret; + return 0; } static int of_fwnode_add_links(struct fwnode_handle *fwnode) -- 1.8.3.1