Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44fe5781 authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman
Browse files

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: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b7382d44
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
}