Skip to content

Commit 9b76968

Browse files
bebarinogregkh
authored andcommitted
spmi: pmic-arb: u8 <= 0xff is always true
Silences this static checker warning: drivers/spmi/spmi-pmic-arb.c:363 pmic_arb_write_cmd() warn: always true condition '(opc <= 255) => (0-255 <= 255)' Cc: Andy Gross <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d514479 commit 9b76968

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spmi/spmi-pmic-arb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ static int pmic_arb_write_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid,
360360
opc = PMIC_ARB_OP_EXT_WRITE;
361361
else if (opc >= 0x30 && opc <= 0x37)
362362
opc = PMIC_ARB_OP_EXT_WRITEL;
363-
else if (opc >= 0x80 && opc <= 0xFF)
363+
else if (opc >= 0x80)
364364
opc = PMIC_ARB_OP_ZERO_WRITE;
365365
else
366366
return -EINVAL;

0 commit comments

Comments
 (0)