[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <835ab066-b6b8-a211-4941-c01781031de8@linux.intel.com>
Date: Tue, 17 Nov 2020 17:40:25 +0800
From: Lu Baolu <baolu.lu@...ux.intel.com>
To: Yang Yingliang <yangyingliang@...wei.com>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Cc: baolu.lu@...ux.intel.com
Subject: Re: [PATCH] iommu: fix return error code in iommu_probe_device()
Hi Yingliang,
On 2020/11/17 10:52, Yang Yingliang wrote:
> If iommu_group_get() failed, it need return error code
> in iommu_probe_device().
>
> Fixes: cf193888bfbd ("iommu: Move new probe_device path...")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
> drivers/iommu/iommu.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index b53446bb8c6b..6f4a32df90f6 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -253,8 +253,10 @@ int iommu_probe_device(struct device *dev)
> goto err_out;
>
> group = iommu_group_get(dev);
> - if (!group)
> + if (!group) {
> + ret = -ENODEV;
Can you please explain why you use -ENODEV here?
Best regards,
baolu
> goto err_release;
> + }
>
> /*
> * Try to allocate a default domain - needs support from the
>
Powered by blists - more mailing lists