diff options
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-alps.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c index b1eeb4839bfc..925396fdf0d9 100644 --- a/drivers/hid/hid-alps.c +++ b/drivers/hid/hid-alps.c @@ -219,6 +219,8 @@ static int t4_read_write_register(struct hid_device *hdev, u32 address, goto exit_readbuf; } + ret = -EINVAL; + if (*(u32 *)&readbuf[6] != address) { dev_err(&hdev->dev, "read register address error (%x,%x)\n", *(u32 *)&readbuf[6], address); |