Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
"Better input validation for compat ioctls and a documentation bugfix
for 5.16"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
Docs: Fixes link to I2C specification
i2c: validate user data in compat ioctl

Changed files
+8 -3
Documentation
drivers
i2c
+5 -3
Documentation/i2c/summary.rst
··· 11 11 and so are not advertised as being I2C but come under different names, 12 12 e.g. TWI (Two Wire Interface), IIC. 13 13 14 - The official I2C specification is the `"I2C-bus specification and user 15 - manual" (UM10204) <https://www.nxp.com/docs/en/user-guide/UM10204.pdf>`_ 16 - published by NXP Semiconductors. 14 + The latest official I2C specification is the `"I2C-bus specification and user 15 + manual" (UM10204) <https://www.nxp.com/webapp/Download?colCode=UM10204>`_ 16 + published by NXP Semiconductors. However, you need to log-in to the site to 17 + access the PDF. An older version of the specification (revision 6) is archived 18 + `here <https://web.archive.org/web/20210813122132/https://www.nxp.com/docs/en/user-guide/UM10204.pdf>`_. 17 19 18 20 SMBus (System Management Bus) is based on the I2C protocol, and is mostly 19 21 a subset of I2C protocols and signaling. Many I2C devices will work on an
+3
drivers/i2c/i2c-dev.c
··· 535 535 sizeof(rdwr_arg))) 536 536 return -EFAULT; 537 537 538 + if (!rdwr_arg.msgs || rdwr_arg.nmsgs == 0) 539 + return -EINVAL; 540 + 538 541 if (rdwr_arg.nmsgs > I2C_RDWR_IOCTL_MAX_MSGS) 539 542 return -EINVAL; 540 543