aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/cros_ec_keyb.c
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-12-01 11:31:10 +0000
committersaturneric <[email protected]>2025-12-01 11:31:10 +0000
commitfa2a26ee8b4693d3733a7d58863cb38cb0e8680e (patch)
tree01f99691b8e34c516e435932f1353ad673bedf2e /drivers/input/keyboard/cros_ec_keyb.c
parentfix(driver): sync specific drivers from rpi upstream (diff)
parentLinux 6.18 (diff)
downloadkernel-main.tar.gz
kernel-main.zip
Merge tag 'v6.18' into linux-6.18.yHEADmainlinux-6.18.y
Linux 6.18
Diffstat (limited to 'drivers/input/keyboard/cros_ec_keyb.c')
-rw-r--r--drivers/input/keyboard/cros_ec_keyb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index f7209c8ebbcc..1c6b0461dc35 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -261,6 +261,12 @@ static int cros_ec_keyb_work(struct notifier_block *nb,
case EC_MKBP_EVENT_KEY_MATRIX:
pm_wakeup_event(ckdev->dev, 0);
+ if (!ckdev->idev) {
+ dev_warn_once(ckdev->dev,
+ "Unexpected key matrix event\n");
+ return NOTIFY_OK;
+ }
+
if (ckdev->ec->event_size != ckdev->cols) {
dev_err(ckdev->dev,
"Discarded incomplete key matrix event.\n");