lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200921082433.2591305-1-liushixin2@huawei.com>
Date:   Mon, 21 Sep 2020 16:24:33 +0800
From:   Liu Shixin <liushixin2@...wei.com>
To:     Wu Hao <hao.wu@...el.com>, Tom Rix <trix@...hat.com>,
        Moritz Fischer <mdf@...nel.org>
CC:     <linux-fpga@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Liu Shixin <liushixin2@...wei.com>
Subject: [PATCH -next] fpga: dfl: simplify the return expression of fme_perf_pmu_register

Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@...wei.com>
---
 drivers/fpga/dfl-fme-perf.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/fpga/dfl-fme-perf.c b/drivers/fpga/dfl-fme-perf.c
index 531266287eee..e881fbe6d838 100644
--- a/drivers/fpga/dfl-fme-perf.c
+++ b/drivers/fpga/dfl-fme-perf.c
@@ -906,7 +906,6 @@ static int fme_perf_pmu_register(struct platform_device *pdev,
 {
 	struct pmu *pmu = &priv->pmu;
 	char *name;
-	int ret;
 
 	spin_lock_init(&priv->fab_lock);
 
@@ -926,11 +925,7 @@ static int fme_perf_pmu_register(struct platform_device *pdev,
 
 	name = devm_kasprintf(priv->dev, GFP_KERNEL, "dfl_fme%d", pdev->id);
 
-	ret = perf_pmu_register(pmu, name, -1);
-	if (ret)
-		return ret;
-
-	return 0;
+	return perf_pmu_register(pmu, name, -1);
 }
 
 static void fme_perf_pmu_unregister(struct fme_perf_priv *priv)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ