From 9ff1db3cc7796f3182cb2a9e577220298bd6d333 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Wed, 16 Jan 2019 20:13:46 -0800 Subject: [PATCH] PM / devfreq: bw_hwmon: irq can be negative platform_get_irq() can return a negative number, but we assign it to an unsigned integer, which can never be negative. Change the type to int here so that we can detect irq errors. Change-Id: I997063abfe5c9966f99014a099619e6bfe7aafe7 Signed-off-by: Stephen Boyd [avajid@codeaurora.org: made minor styling changes] Signed-off-by: Amir Vajid --- drivers/devfreq/bimc-bwmon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/bimc-bwmon.c b/drivers/devfreq/bimc-bwmon.c index 6b0bae90ba24..b93ad308057f 100644 --- a/drivers/devfreq/bimc-bwmon.c +++ b/drivers/devfreq/bimc-bwmon.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2014-2016, 2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017, 2019, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "bimc-bwmon: " fmt @@ -57,7 +57,7 @@ struct bwmon { void __iomem *base; void __iomem *global_base; unsigned int mport; - unsigned int irq; + int irq; const struct bwmon_spec *spec; struct device *dev; struct bw_hwmon hw;