Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752136AbcKQFGO (ORCPT ); Thu, 17 Nov 2016 00:06:14 -0500 Received: from hqemgate15.nvidia.com ([216.228.121.64]:16285 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750794AbcKQFGM (ORCPT ); Thu, 17 Nov 2016 00:06:12 -0500 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 16 Nov 2016 21:06:10 -0800 Subject: Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev To: , , , , , , , , , References: <1479329194-10247-1-git-send-email-kwankhede@nvidia.com> <1479329194-10247-13-git-send-email-kwankhede@nvidia.com> <20161117021533.GD6620@bjsdjshi@linux.vnet.ibm.com> X-Nvconfidentiality: public From: Kirti Wankhede Message-ID: <7465681f-f076-20ab-18aa-444b49cbfe11@nvidia.com> Date: Thu, 17 Nov 2016 10:35:58 +0530 MIME-Version: 1.0 In-Reply-To: <20161117021533.GD6620@bjsdjshi@linux.vnet.ibm.com> X-Originating-IP: [10.24.250.83] X-ClientProxiedBy: DRUKMAIL102.nvidia.com (10.25.59.20) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 761 Lines: 30 On 11/17/2016 7:45 AM, Dong Jia Shi wrote: > * Kirti Wankhede [2016-11-17 02:16:24 +0530]: > > Hi Kirti, > >> diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c > [...] > >> @@ -51,6 +78,11 @@ static void vfio_mdev_release(void *device_data) >> if (likely(parent->ops->release)) >> parent->ops->release(mdev); >> >> + if (likely(parent->ops->notifier)) { >> + if (vfio_unregister_notifier(&mdev->dev, &mdev->nb)) >> + pr_err("Failed to unregister notifier for mdev\n"); > For the -ENOTTY case, we should not fail here either. > Removing the error print and ignoring return from this unregister call. Updating this patch on this thread. >> + } >> + >> module_put(THIS_MODULE); >> } >> > [...] >