[PATCH v3 11/16] arm_mpam: propagate MSC write errors for hardware probe functions

Jonathan Cameron jonathan.cameron at oss.qualcomm.com
Fri Jul 10 12:04:34 PDT 2026


On Fri, 10 Jul 2026 16:45:15 +0200
Andre Przywara <andre.przywara at arm.com> wrote:

> Allow the MSC write accesses in the hardware probe functions to return an
> error, and propagate write errors from the lower level up.
> 
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> @@ -1080,9 +1087,11 @@ static int mpam_msc_hw_probe(struct mpam_msc *msc)
>  		ris->idr = idr;
>  
>  		mutex_lock(&msc->part_sel_lock);
> -		__mpam_part_sel(ris_idx, 0, msc);
> -		ret = mpam_ris_hw_probe(ris);
> +		ret = __mpam_part_sel(ris_idx, 0, msc);
> +		if (!ret)
> +			ret = mpam_ris_hw_probe(ris);
>  		mutex_unlock(&msc->part_sel_lock);
> +
Similar to before, scoped_guard() and burn a few lines to get
simpler code flow.

Various other comments from earlier patches apply in this one
as well, I'm just assuming you'll make similar changes (if
you adopt them based on earlier comments)

Jonathan

>  		if (ret)
>  			return ret;
>  	}




More information about the linux-arm-kernel mailing list