Skip to content

Commit d9ef632

Browse files
committed
perf: arm-cmn: Fix unsigned comparison to less than zero
Ensure that the 'irq' field of 'struct arm_cmn_dtc' is a signed int so that it can be compared '< 0'. Link: https://lore.kernel.org/r/20200929170835.GA15956@embeddedor Addresses-Coverity-ID: 1497488 ("Unsigned compared against 0") Fixes: 0ba6477 ("perf: Add Arm CMN-600 PMU driver") Reported-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
1 parent d8f6267 commit d9ef632

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/perf/arm-cmn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ struct arm_cmn_node {
217217

218218
struct arm_cmn_dtc {
219219
void __iomem *base;
220-
unsigned int irq;
220+
int irq;
221221
int irq_friend;
222222
bool cc_active;
223223

0 commit comments

Comments
 (0)