Skip to content
Commit c1e64c0a authored by Maxim Kochetkov's avatar Maxim Kochetkov Committed by Li Yang
Browse files

soc: fsl: qe: fix static checker warning



The patch be7ecbd2: "soc: fsl: qe: convert QE interrupt
controller to platform_device" from Aug 3, 2021, leads to the
following static checker warning:

	drivers/soc/fsl/qe/qe_ic.c:438 qe_ic_init()
	warn: unsigned 'qe_ic->virq_low' is never less than zero.

In old variant irq_of_parse_and_map() returns zero if failed so
unsigned int for virq_high/virq_low was ok.
In new variant platform_get_irq() returns negative error codes
if failed so we need to use int for virq_high/virq_low.

Also simplify high_handler checking and remove the curly braces
to make checkpatch happy.

Fixes: be7ecbd2 ("soc: fsl: qe: convert QE interrupt controller to platform_device")
Signed-off-by: default avatarMaxim Kochetkov <fido_max@inbox.ru>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
parent be7ecbd2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment