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 branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
"One driver bugfix, a documentation bugfix, and an "uninitialized data"
leak fix for the core"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
Documentation: i2c: add i2c-sysfs into index
i2c: dev: zero out array used for i2c reads from userspace
i2c: iproc: fix race between client unreg and tasklet

+6 -4
+1
Documentation/i2c/index.rst
··· 17 17 busses/index 18 18 i2c-topology 19 19 muxes/i2c-mux-gpio 20 + i2c-sysfs 20 21 21 22 Writing device drivers 22 23 ======================
+2 -2
drivers/i2c/busses/i2c-bcm-iproc.c
··· 1224 1224 1225 1225 disable_irq(iproc_i2c->irq); 1226 1226 1227 + tasklet_kill(&iproc_i2c->slave_rx_tasklet); 1228 + 1227 1229 /* disable all slave interrupts */ 1228 1230 tmp = iproc_i2c_rd_reg(iproc_i2c, IE_OFFSET); 1229 1231 tmp &= ~(IE_S_ALL_INTERRUPT_MASK << 1230 1232 IE_S_ALL_INTERRUPT_SHIFT); 1231 1233 iproc_i2c_wr_reg(iproc_i2c, IE_OFFSET, tmp); 1232 - 1233 - tasklet_kill(&iproc_i2c->slave_rx_tasklet); 1234 1234 1235 1235 /* Erase the slave address programmed */ 1236 1236 tmp = iproc_i2c_rd_reg(iproc_i2c, S_CFG_SMBUS_ADDR_OFFSET);
+3 -2
drivers/i2c/i2c-dev.c
··· 141 141 if (count > 8192) 142 142 count = 8192; 143 143 144 - tmp = kmalloc(count, GFP_KERNEL); 144 + tmp = kzalloc(count, GFP_KERNEL); 145 145 if (tmp == NULL) 146 146 return -ENOMEM; 147 147 ··· 150 150 151 151 ret = i2c_master_recv(client, tmp, count); 152 152 if (ret >= 0) 153 - ret = copy_to_user(buf, tmp, count) ? -EFAULT : ret; 153 + if (copy_to_user(buf, tmp, ret)) 154 + ret = -EFAULT; 154 155 kfree(tmp); 155 156 return ret; 156 157 }