From: Liu Shixin <liushixin2@huawei.com>
To: Wu Hao <hao.wu@intel.com>, Tom Rix <trix@redhat.com>,
Moritz Fischer <mdf@kernel.org>
Cc: <linux-fpga@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Liu Shixin <liushixin2@huawei.com>
Subject: [PATCH -next] fpga: dfl: simplify the return expression of fme_perf_pmu_register
Date: Mon, 21 Sep 2020 16:24:33 +0800 [thread overview]
Message-ID: <20200921082433.2591305-1-liushixin2@huawei.com> (raw)
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@huawei.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
next reply other threads:[~2020-09-21 8:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 8:24 Liu Shixin [this message]
2020-09-21 15:36 ` [PATCH -next] fpga: dfl: simplify the return expression of fme_perf_pmu_register Wu, Hao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200921082433.2591305-1-liushixin2@huawei.com \
--to=liushixin2@huawei.com \
--cc=hao.wu@intel.com \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).