lkml.org 
[lkml]   [2017]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/4] iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device
From
Date
On 04/07/2017 09:41 AM, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
>
> Don't leave a stale pointer in case the device continues to
> exist for some more time.
>
> Signed-off-by: Joerg Roedel <jroedel@suse.de>

Acked-by: Suman Anna <s-anna@ti.com>

> ---
> drivers/iommu/omap-iommu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index e9c9b08..08bd731 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -1259,6 +1259,8 @@ static void omap_iommu_remove_device(struct device *dev)
> if (!dev->of_node || !arch_data)
> return;
>
> + dev->archdata.iommu = NULL;
> +
> kfree(arch_data->name);
> kfree(arch_data);
> }
>

\
 
 \ /
  Last update: 2017-04-11 23:26    [W:0.094 / U:1.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site