[PATCH] intel_th: sth: Remove unnecessary return value

From: Qi Liu
Date: Thu May 13 2021 - 09:37:30 EST


From: Junhao He <hejunhao2@xxxxxxxxxxxxx>

intel_th_sw_init() always return true, it's unnecessary to keep
the return value.

Signed-off-by: Junhao He <hejunhao2@xxxxxxxxxxxxx>
Signed-off-by: Qi Liu <liuqi115@xxxxxxxxxx>
---
drivers/hwtracing/intel_th/sth.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/hwtracing/intel_th/sth.c b/drivers/hwtracing/intel_th/sth.c
index 9ca8c4e..5d4effd 100644
--- a/drivers/hwtracing/intel_th/sth.c
+++ b/drivers/hwtracing/intel_th/sth.c
@@ -164,7 +164,7 @@ static int sth_stm_link(struct stm_data *stm_data, unsigned int master,
return intel_th_set_output(to_intel_th_device(sth->dev), master);
}

-static int intel_th_sw_init(struct sth_device *sth)
+static void intel_th_sw_init(struct sth_device *sth)
{
u32 reg;

@@ -179,8 +179,6 @@ static int intel_th_sw_init(struct sth_device *sth)
dev_dbg(sth->dev, "sw_start: %x sw_end: %x masters: %x nchannels: %x\n",
sth->stm.sw_start, sth->stm.sw_end, sth->sw_nmasters,
sth->stm.sw_nchannels);
-
- return 0;
}

static int intel_th_sth_probe(struct intel_th_device *thdev)
@@ -221,9 +219,7 @@ static int intel_th_sth_probe(struct intel_th_device *thdev)
sth->stm.sw_mmiosz = sizeof(struct intel_th_channel);
sth->stm.link = sth_stm_link;

- err = intel_th_sw_init(sth);
- if (err)
- return err;
+ intel_th_sw_init(sth);

err = stm_register_device(dev, &sth->stm, THIS_MODULE);
if (err) {
--
2.8.1