File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
drivers/iommu/arm/arm-smmu-v3 Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2906,8 +2906,8 @@ int arm_smmu_attach_prepare(struct arm_smmu_attach_state *state,
2906
2906
2907
2907
master_domain = kzalloc (sizeof (* master_domain ), GFP_KERNEL );
2908
2908
if (!master_domain ) {
2909
- kfree ( state -> vmaster ) ;
2910
- return - ENOMEM ;
2909
+ ret = - ENOMEM ;
2910
+ goto err_free_vmaster ;
2911
2911
}
2912
2912
master_domain -> domain = new_domain ;
2913
2913
master_domain -> master = master ;
@@ -2941,7 +2941,6 @@ int arm_smmu_attach_prepare(struct arm_smmu_attach_state *state,
2941
2941
!arm_smmu_master_canwbs (master )) {
2942
2942
spin_unlock_irqrestore (& smmu_domain -> devices_lock ,
2943
2943
flags );
2944
- kfree (state -> vmaster );
2945
2944
ret = - EINVAL ;
2946
2945
goto err_iopf ;
2947
2946
}
@@ -2967,6 +2966,8 @@ int arm_smmu_attach_prepare(struct arm_smmu_attach_state *state,
2967
2966
arm_smmu_disable_iopf (master , master_domain );
2968
2967
err_free_master_domain :
2969
2968
kfree (master_domain );
2969
+ err_free_vmaster :
2970
+ kfree (state -> vmaster );
2970
2971
return ret ;
2971
2972
}
2972
2973
You can’t perform that action at this time.
0 commit comments