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

From: Jonathan Cameron

Date: Fri Jul 10 2026 - 15:04:48 EST


On Fri, 10 Jul 2026 16:45:15 +0200
Andre Przywara <andre.przywara@xxxxxxx> 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@xxxxxxx>
> @@ -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;
> }