Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752557AbdF1Qd0 (ORCPT ); Wed, 28 Jun 2017 12:33:26 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:11523 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751810AbdF1QdP (ORCPT ); Wed, 28 Jun 2017 12:33:15 -0400 Subject: Re: [PATCH 2/3] iommu/omap: Return ERR_PTR in device_group call-back To: Joerg Roedel , CC: , Gerald Schaefer , Joerg Roedel References: <1498651258-23700-1-git-send-email-joro@8bytes.org> <1498651258-23700-2-git-send-email-joro@8bytes.org> From: Suman Anna Message-ID: <345ed003-6a6e-a876-fa91-cdc9fcc1cd89@ti.com> Date: Wed, 28 Jun 2017 11:32:02 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1498651258-23700-2-git-send-email-joro@8bytes.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [128.247.58.153] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 955 Lines: 32 On 06/28/2017 07:00 AM, Joerg Roedel wrote: > From: Joerg Roedel > > Make sure that the device_group callback returns an ERR_PTR > instead of NULL. > > Signed-off-by: Joerg Roedel Thanks for the patch, Acked-by: Suman Anna regards Suman > --- > drivers/iommu/omap-iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c > index 95dfca3..641e035 100644 > --- a/drivers/iommu/omap-iommu.c > +++ b/drivers/iommu/omap-iommu.c > @@ -1309,7 +1309,7 @@ static void omap_iommu_remove_device(struct device *dev) > static struct iommu_group *omap_iommu_device_group(struct device *dev) > { > struct omap_iommu_arch_data *arch_data = dev->archdata.iommu; > - struct iommu_group *group = NULL; > + struct iommu_group *group = ERR_PTR(-EINVAL); > > if (arch_data->iommu_dev) > group = arch_data->iommu_dev->group; >