Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'i2c-for-6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
"Fix a race condition in the at24 eeprom handler, a NULL pointer
exception in the I2C core for controllers only using target modes,
drop a MAINTAINERS entry, and fix an incorrect DT binding for at24"

* tag 'i2c-for-6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: smbus: fix NULL function pointer dereference
MAINTAINERS: Drop entry for PCA9541 bus master selector
eeprom: at24: fix memory corruption race condition
dt-bindings: eeprom: at24: Fix ST M24C64-D compatible schema

+16 -25
+1 -4
Documentation/devicetree/bindings/eeprom/at24.yaml
··· 69 69 - items: 70 70 pattern: c32$ 71 71 - items: 72 - pattern: c32d-wl$ 73 - - items: 74 72 pattern: cs32$ 75 73 - items: 76 74 pattern: c64$ 77 - - items: 78 - pattern: c64d-wl$ 79 75 - items: 80 76 pattern: cs64$ 81 77 - items: ··· 132 136 - renesas,r1ex24128 133 137 - samsung,s524ad0xd1 134 138 - const: atmel,24c128 139 + - pattern: '^atmel,24c(32|64)d-wl$' # Actual vendor is st 135 140 136 141 label: 137 142 description: Descriptive name of the EEPROM.
-6
MAINTAINERS
··· 16798 16798 F: drivers/leds/leds-pca9532.c 16799 16799 F: include/linux/leds-pca9532.h 16800 16800 16801 - PCA9541 I2C BUS MASTER SELECTOR DRIVER 16802 - M: Guenter Roeck <linux@roeck-us.net> 16803 - L: linux-i2c@vger.kernel.org 16804 - S: Maintained 16805 - F: drivers/i2c/muxes/i2c-mux-pca9541.c 16806 - 16807 16801 PCI DRIVER FOR AARDVARK (Marvell Armada 3700) 16808 16802 M: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 16809 16803 M: Pali Rohár <pali@kernel.org>
+6 -6
drivers/i2c/i2c-core-base.c
··· 2200 2200 * Returns negative errno, else the number of messages executed. 2201 2201 * 2202 2202 * Adapter lock must be held when calling this function. No debug logging 2203 - * takes place. adap->algo->master_xfer existence isn't checked. 2203 + * takes place. 2204 2204 */ 2205 2205 int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) 2206 2206 { 2207 2207 unsigned long orig_jiffies; 2208 2208 int ret, try; 2209 + 2210 + if (!adap->algo->master_xfer) { 2211 + dev_dbg(&adap->dev, "I2C level transfers not supported\n"); 2212 + return -EOPNOTSUPP; 2213 + } 2209 2214 2210 2215 if (WARN_ON(!msgs || num < 1)) 2211 2216 return -EINVAL; ··· 2277 2272 int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) 2278 2273 { 2279 2274 int ret; 2280 - 2281 - if (!adap->algo->master_xfer) { 2282 - dev_dbg(&adap->dev, "I2C level transfers not supported\n"); 2283 - return -EOPNOTSUPP; 2284 - } 2285 2275 2286 2276 /* REVISIT the fault reporting model here is weak: 2287 2277 *
+9 -9
drivers/misc/eeprom/at24.c
··· 758 758 } 759 759 pm_runtime_enable(dev); 760 760 761 - at24->nvmem = devm_nvmem_register(dev, &nvmem_config); 762 - if (IS_ERR(at24->nvmem)) { 763 - pm_runtime_disable(dev); 764 - if (!pm_runtime_status_suspended(dev)) 765 - regulator_disable(at24->vcc_reg); 766 - return dev_err_probe(dev, PTR_ERR(at24->nvmem), 767 - "failed to register nvmem\n"); 768 - } 769 - 770 761 /* 771 762 * Perform a one-byte test read to verify that the chip is functional, 772 763 * unless powering on the device is to be avoided during probe (i.e. ··· 771 780 regulator_disable(at24->vcc_reg); 772 781 return -ENODEV; 773 782 } 783 + } 784 + 785 + at24->nvmem = devm_nvmem_register(dev, &nvmem_config); 786 + if (IS_ERR(at24->nvmem)) { 787 + pm_runtime_disable(dev); 788 + if (!pm_runtime_status_suspended(dev)) 789 + regulator_disable(at24->vcc_reg); 790 + return dev_err_probe(dev, PTR_ERR(at24->nvmem), 791 + "failed to register nvmem\n"); 774 792 } 775 793 776 794 /* If this a SPD EEPROM, probe for DDR3 thermal sensor */