[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170207154353.20691-3-laurentiu.tudor@nxp.com>
Date: Tue, 7 Feb 2017 09:43:45 -0600
From: <laurentiu.tudor@....com>
To: <gregkh@...uxfoundation.org>
CC: <devel@...verdev.osuosl.org>, <linux-kernel@...r.kernel.org>,
<agraf@...e.de>, <arnd@...db.de>, <ioana.ciornei@....com>,
<ruxandra.radulescu@....com>, <bharat.bhushan@....com>,
<stuart.yoder@....com>, <catalin.horghidan@....com>,
<leoyang.li@....com>, <roy.pledge@....com>,
<linux-arm-kernel@...ts.infradead.org>,
Laurentiu Tudor <laurentiu.tudor@....com>
Subject: [PATCH v3 02/10] staging: fsl-mc: fix device ref counting
From: Laurentiu Tudor <laurentiu.tudor@....com>
Drop unneeded get_device() call at device creation
and, as per documentation, drop reference count
after using device_find_child() return.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@....com>
---
v3:
- no changes
drivers/staging/fsl-mc/bus/dprc-driver.c | 1 +
drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c
index 4e416d8..e4b0341 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
@@ -188,6 +188,7 @@ static void dprc_add_new_devices(struct fsl_mc_device *mc_bus_dev,
child_dev = fsl_mc_device_lookup(obj_desc, mc_bus_dev);
if (child_dev) {
check_plugged_state_change(child_dev, obj_desc);
+ put_device(&child_dev->dev);
continue;
}
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
index cc20dc4..7c6a43b 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
@@ -537,7 +537,6 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc,
goto error_cleanup_dev;
}
- (void)get_device(&mc_dev->dev);
dev_dbg(parent_dev, "added %s\n", dev_name(&mc_dev->dev));
*new_mc_dev = mc_dev;
--
1.8.3.1
Powered by blists - more mailing lists