From: Jonathan Zhou <[email protected]>

[ Upstream commit 4020fc8d4658dc1dbc27c5644bcb6254caa05e5e ]

The member @nr_addr_cmp is not a bool value, using operator '>'
instead to avoid unexpected failure.

Fixes: a77de2637c9e ("coresight: etm4x: moving sysFS entries to a dedicated 
file")
Cc: Mathieu Poirier <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Cc: Mike Leach <[email protected]>
Cc: Shaokun Zhang <[email protected]>
Signed-off-by: Jonathan Zhou <[email protected]>
Signed-off-by: Mathieu Poirier <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
 drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c 
b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
index b673e738bc9a8..a588cd6de01c7 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
@@ -206,7 +206,7 @@ static ssize_t reset_store(struct device *dev,
         * each trace run.
         */
        config->vinst_ctrl = BIT(0);
-       if (drvdata->nr_addr_cmp == true) {
+       if (drvdata->nr_addr_cmp > 0) {
                config->mode |= ETM_MODE_VIEWINST_STARTSTOP;
                /* SSSTATUS, bit[9] */
                config->vinst_ctrl |= BIT(9);
-- 
2.25.1



Reply via email to