]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
arm_mpam: resctrl: Fix the check for no monitor components found
authorBen Horgan <ben.horgan@arm.com>
Tue, 14 Apr 2026 13:27:56 +0000 (14:27 +0100)
committerJames Morse <james.morse@arm.com>
Fri, 17 Apr 2026 16:48:07 +0000 (17:48 +0100)
commit67c0a487efa542cca9477ea84915db2e091f98d0
tree34e09e558e7bf3a9c66ea502312139cb7c4248c7
parentf758340da529ccb12531c3f83d5992e912f6c8d5
arm_mpam: resctrl: Fix the check for no monitor components found

Dan Carpenter reports that, in mpam_resctrl_alloc_domain(), any_mon_comp is
used in an 'if' condition when it may be uninitialized. Initialize it to
NULL so that the check behaves correctly when no monitor components are
found.

Reported-by: Dan Carpenter <error27@gmail.com>
Fixes: 264c285999fc ("arm_mpam: resctrl: Add monitor initialisation and domain boilerplate")
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: James Morse <james.morse@arm.com>
drivers/resctrl/mpam_resctrl.c