lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac9eb221-8483-45e5-6f87-6dcc5decfb45@arm.com>
Date:   Wed, 7 Mar 2018 12:59:55 +0000
From:   Robin Murphy <robin.murphy@....com>
To:     Jeffy Chen <jeffy.chen@...k-chips.com>,
        linux-kernel@...r.kernel.org
Cc:     jcliang@...omium.org, xxm@...k-chips.com, tfiga@...omium.org,
        Heiko Stuebner <heiko@...ech.de>,
        linux-rockchip@...ts.infradead.org,
        iommu@...ts.linux-foundation.org, Joerg Roedel <joro@...tes.org>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v7 02/14] iommu/rockchip: Fix error handling in probe

On 06/03/18 03:02, Jeffy Chen wrote:
> Add missing iommu_device_sysfs_remove in error path.

Acked-by: Robin Murphy <robin.murphy@....com>

(strictly you don't need to introduce the additional return, but it's 
only a couple of lines and definitely not worth respinning just for that)

> Signed-off-by: Jeffy Chen <jeffy.chen@...k-chips.com>
> Reviewed-by: Tomasz Figa <tfiga@...omium.org>
> ---
> 
> Changes in v7: None
> Changes in v6: None
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
> 
>   drivers/iommu/rockchip-iommu.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
> index 16cd8780c289..c2ef3cbd4401 100644
> --- a/drivers/iommu/rockchip-iommu.c
> +++ b/drivers/iommu/rockchip-iommu.c
> @@ -1193,8 +1193,12 @@ static int rk_iommu_probe(struct platform_device *pdev)
>   
>   	iommu_device_set_ops(&iommu->iommu, &rk_iommu_ops);
>   	err = iommu_device_register(&iommu->iommu);
> +	if (err) {
> +		iommu_device_sysfs_remove(&iommu->iommu);
> +		return err;
> +	}
>   
> -	return err;
> +	return 0;
>   }
>   
>   static const struct of_device_id rk_iommu_dt_ids[] = {
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ