lkml.org 
[lkml]   [2019]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 03/57] drivers: coresight: Drop device references found via bus_find_device
Date
We must drop references to the device found via bus_find_device().

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
drivers/hwtracing/coresight/coresight.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c
index 4b13028..37ccd67 100644
--- a/drivers/hwtracing/coresight/coresight.c
+++ b/drivers/hwtracing/coresight/coresight.c
@@ -540,7 +540,7 @@ struct coresight_device *coresight_get_enabled_sink(bool deactivate)

dev = bus_find_device(&coresight_bustype, NULL, &deactivate,
coresight_enabled_sink);
-
+ put_device(dev);
return dev ? to_coresight_device(dev) : NULL;
}

@@ -581,7 +581,7 @@ struct coresight_device *coresight_get_sink_by_id(u32 id)

dev = bus_find_device(&coresight_bustype, NULL, &id,
coresight_sink_by_id);
-
+ put_device(dev);
return dev ? to_coresight_device(dev) : NULL;
}

--
2.7.4
\
 
 \ /
  Last update: 2019-06-03 17:55    [W:0.093 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site