diff options
author | Laurentiu Tudor <laurentiu.tudor@nxp.com> | 2017-02-07 09:43:45 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-09 13:26:01 +0100 |
commit | 95b5daf5326a3875a1e7b8f32b61d24bb790ef43 (patch) | |
tree | 9e63f93e2eedec8dc5f36a8e44f34ef395ac4be1 /drivers/staging/fsl-mc | |
parent | 0e724ba37e388c6136c1a7a5b8e3804c4a96abc9 (diff) | |
download | linux-95b5daf5326a3875a1e7b8f32b61d24bb790ef43.tar.bz2 |
staging: fsl-mc: fix device ref counting
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@nxp.com>
Acked-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fsl-mc')
-rw-r--r-- | drivers/staging/fsl-mc/bus/dprc-driver.c | 1 | ||||
-rw-r--r-- | drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c index 4e416d89b736..e4b0341d42d7 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 cc20dc454185..7c6a43b2c0dc 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; |