* [PATCH] input: fix variable type
@ 2022-03-08 2:50 cgel.zte
2022-03-09 7:07 ` Mattijs Korpershoek
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-03-08 2:50 UTC (permalink / raw)
To: dmitry.torokhov
Cc: matthias.bgg, mkorpershoek, lv.ruyi, fengping.yu, m.felsch,
linux-input, linux-arm-kernel, linux-mediatek, linux-kernel,
Zeal Robot
From: Lv Ruyi (CGEL ZTE) <lv.ruyi@zte.com.cn>
The irq is defined unsigned int. If the platform_get_irq return a negative
value, data type cast may result in error.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi (CGEL ZTE) <lv.ruyi@zte.com.cn>
---
drivers/input/keyboard/mt6779-keypad.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/mt6779-keypad.c b/drivers/input/keyboard/mt6779-keypad.c
index 5ff23250ed37..0dbbddc7f298 100644
--- a/drivers/input/keyboard/mt6779-keypad.c
+++ b/drivers/input/keyboard/mt6779-keypad.c
@@ -91,7 +91,7 @@ static void mt6779_keypad_clk_disable(void *data)
static int mt6779_keypad_pdrv_probe(struct platform_device *pdev)
{
struct mt6779_keypad *keypad;
- unsigned int irq;
+ int irq;
u32 debounce;
bool wakeup;
int error;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] input: fix variable type
2022-03-08 2:50 [PATCH] input: fix variable type cgel.zte
@ 2022-03-09 7:07 ` Mattijs Korpershoek
0 siblings, 0 replies; 2+ messages in thread
From: Mattijs Korpershoek @ 2022-03-09 7:07 UTC (permalink / raw)
To: cgel.zte, dmitry.torokhov
Cc: matthias.bgg, lv.ruyi, fengping.yu, m.felsch, linux-input,
linux-arm-kernel, linux-mediatek, linux-kernel, Zeal Robot
On Tue, Mar 08, 2022 at 02:50, cgel.zte@gmail.com wrote:
> From: Lv Ruyi (CGEL ZTE) <lv.ruyi@zte.com.cn>
>
> The irq is defined unsigned int. If the platform_get_irq return a negative
> value, data type cast may result in error.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Lv Ruyi (CGEL ZTE) <lv.ruyi@zte.com.cn>
> ---
> drivers/input/keyboard/mt6779-keypad.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/mt6779-keypad.c b/drivers/input/keyboard/mt6779-keypad.c
> index 5ff23250ed37..0dbbddc7f298 100644
> --- a/drivers/input/keyboard/mt6779-keypad.c
> +++ b/drivers/input/keyboard/mt6779-keypad.c
> @@ -91,7 +91,7 @@ static void mt6779_keypad_clk_disable(void *data)
> static int mt6779_keypad_pdrv_probe(struct platform_device *pdev)
> {
> struct mt6779_keypad *keypad;
> - unsigned int irq;
> + int irq;
> u32 debounce;
> bool wakeup;
> int error;
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> --
> 2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-09 7:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-08 2:50 [PATCH] input: fix variable type cgel.zte
2022-03-09 7:07 ` Mattijs Korpershoek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).