Use if and else instead of if(A) and if (!A). Signed-off-by: Wan Jiabing <wanjiabing@xxxxxxxx> --- drivers/hid/wacom_wac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 64fe573deb9b..886e87f1c8bb 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -181,10 +181,10 @@ static int wacom_pl_irq(struct wacom_wac *wacom) input_report_key(input, BTN_STYLUS, data[4] & 0x10); /* Only allow the stylus2 button to be reported for the pen tool. */ input_report_key(input, BTN_STYLUS2, (wacom->tool[0] == BTN_TOOL_PEN) && (data[4] & 0x20)); + } else { + wacom->id[0] = 0; } - if (!prox) - wacom->id[0] = 0; input_report_key(input, wacom->tool[0], prox); input_report_abs(input, ABS_MISC, wacom->id[0]); return 1; -- 2.35.1