From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suman Anna via iommu Subject: Re: [PATCH 2/3] iommu/omap: Return ERR_PTR in device_group call-back Date: Wed, 28 Jun 2017 11:32:02 -0500 Message-ID: <345ed003-6a6e-a876-fa91-cdc9fcc1cd89@ti.com> References: <1498651258-23700-1-git-send-email-joro@8bytes.org> <1498651258-23700-2-git-send-email-joro@8bytes.org> Reply-To: Suman Anna Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1498651258-23700-2-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Joerg Roedel , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Cc: Joerg Roedel , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Gerald Schaefer List-Id: iommu@lists.linux-foundation.org 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; >