diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2015-12-22 09:52:52 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-08 01:34:58 (GMT) |
commit | 44fe57818b8038ece1d6089c5075a5c73ad7e18a (patch) | |
tree | a7f3ebf759a51eab8a1c8b93974d51674b92f2b1 | |
parent | b7382d44a530cd8c1bc156ddc123e3f09ae68746 (diff) | |
download | linux-44fe57818b8038ece1d6089c5075a5c73ad7e18a.tar.xz |
staging: most: move call to disconnect_channel callback
This patch invokes AIM's disconnect_channel callback before the
corresponding pointers are re-initialized to NULL.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/most/mostcore/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c index 995987d..d5ef61d 100644 --- a/drivers/staging/most/mostcore/core.c +++ b/drivers/staging/most/mostcore/core.c @@ -1046,12 +1046,12 @@ static ssize_t store_remove_link(struct most_aim_obj *aim_obj, if (IS_ERR(c)) return -ENODEV; + if (aim_obj->driver->disconnect_channel(c->iface, c->channel_id)) + return -EIO; if (c->aim0.ptr == aim_obj->driver) c->aim0.ptr = NULL; if (c->aim1.ptr == aim_obj->driver) c->aim1.ptr = NULL; - if (aim_obj->driver->disconnect_channel(c->iface, c->channel_id)) - return -EIO; return len; } |