lkml.org 
[lkml]   [2018]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4 04/13] iommu/rockchip: Fix error handling in attach
    Hi Robin,

    On 01/18/2018 09:23 PM, Robin Murphy wrote:
    >>
    >> @@ -837,7 +837,7 @@ static int rk_iommu_attach_device(struct
    >> iommu_domain *domain,
    >> ret = rk_iommu_enable_paging(iommu);
    >> if (ret)
    >> - return ret;
    >> + goto err_disable_stall;
    >> spin_lock_irqsave(&rk_domain->iommus_lock, flags);
    >> list_add_tail(&iommu->node, &rk_domain->iommus);
    >> @@ -848,6 +848,11 @@ static int rk_iommu_attach_device(struct
    >> iommu_domain *domain,
    >> rk_iommu_disable_stall(iommu);
    >> return 0;
    >
    > Nit: if you like, it looks reasonable to name the label
    > "out_disable_stall" and remove these lines above here, to save the
    > duplication between the error and success paths (since ret will already
    > be 0 on the latter).
    >
    right, i think so, will do it in the next version.
    > Either way,
    >
    > Reviewed-by: Robin Murphy <robin.murphy@arm.com>


    \
     
     \ /
      Last update: 2018-01-18 15:23    [W:3.141 / U:1.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site