From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id B7F5F1C0BE0 for ; Tue, 22 Dec 2015 09:54:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B104F92471 for ; Tue, 22 Dec 2015 09:54:46 +0000 (UTC) Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KkY7HBITl2iP for ; Tue, 22 Dec 2015 09:54:43 +0000 (UTC) Received: from email.microchip.com (exsmtp03.microchip.com [198.175.253.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0BA48924A3 for ; Tue, 22 Dec 2015 09:54:31 +0000 (UTC) From: Christian Gromm Subject: [PATCH 11/28] staging: most: move call to disconnect_channel callback Date: Tue, 22 Dec 2015 10:52:52 +0100 Message-ID: <1450777989-5551-12-git-send-email-christian.gromm@microchip.com> In-Reply-To: <1450777989-5551-1-git-send-email-christian.gromm@microchip.com> References: <1450777989-5551-1-git-send-email-christian.gromm@microchip.com> MIME-Version: 1.0 List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: gregkh@linuxfoundation.org Cc: Christian Gromm , driverdev-devel@linuxdriverproject.org This patch invokes AIM's disconnect_channel callback before the corresponding pointers are re-initialized to NULL. Signed-off-by: Christian Gromm --- This patch has been resent on behalf of Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 4 ++-- 1 file 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; } -- 1.7.9.5 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel