remarkable-linux/drivers/char
Peter Huewe 85c5e0d451 tpm/tpm_i2c_stm_st33: Check return code of get_burstcount
The 'get_burstcount' function can in some circumstances 'return -EBUSY' which
in tpm_stm_i2c_send is stored in an 'u32 burstcnt'
thus converting the signed value into an unsigned value, resulting
in 'burstcnt' being huge.
Changing the type to u32 only does not solve the problem as the signed
value is converted to an unsigned in I2C_WRITE_DATA, resulting in the
same effect.

Thus
-> Change type of burstcnt to u32 (the return type of get_burstcount)
-> Add a check for the return value of 'get_burstcount' and propagate a
potential error.

This makes also sense in the 'I2C_READ_DATA' case, where the there is no
signed/unsigned conversion.

found by coverity
Cc: stable@vger.kernel.org
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
2014-01-06 14:37:24 +01:00
..
agp parisc: agp/parisc-agp: allow binding of user memory to the AGP GART 2013-07-31 23:42:00 +02:00
hw_random Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-11-23 16:18:25 -08:00
ipmi BMC support for PARISC machines 2013-09-05 08:34:32 -07:00
mwave mwave: fix info leak in mwave_ioctl() 2013-07-09 10:33:28 -07:00
pcmcia pcmcia: synclink_cs: replace sum of bitmasks with OR operation. 2013-07-26 17:59:07 -07:00
tpm tpm/tpm_i2c_stm_st33: Check return code of get_burstcount 2014-01-06 14:37:24 +01:00
xilinx_hwicap char: hwicap: Remove unnecessary dev_set_drvdata() 2013-10-03 16:03:31 -07:00
apm-emulation.c
applicom.c
applicom.h
bfin-otp.c
bsr.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
ds1302.c
ds1620.c
dsp56k.c
dtlk.c
efirtc.c
generic_nvram.c
genrtc.c
hangcheck-timer.c
hpet.c drivers/char/hpet.c: allow user controlled mmap for user processes 2013-11-13 12:09:11 +09:00
i8k.c drivers/char/i8k.c: add Dell XPLS L421X 2013-12-04 20:22:40 -08:00
Kconfig drivers/char/hpet.c: allow user controlled mmap for user processes 2013-11-13 12:09:11 +09:00
lp.c
Makefile
mbcs.c
mbcs.h
mem.c /dev/oldmem: Remove the interface 2013-07-03 16:08:03 -07:00
misc.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-11-13 15:34:18 +09:00
mmtimer.c
msm_smd_pkt.c
mspec.c
nsc_gpio.c
nvram.c
nwbutton.c various char drivers: remove deprecated IRQF_DISABLED 2013-10-16 12:36:10 -07:00
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
ps3flash.c
random.c The /dev/random changes for 3.13 including a number of improvements in 2013-11-16 10:19:15 -08:00
raw.c
rtc.c various char drivers: remove deprecated IRQF_DISABLED 2013-10-16 12:36:10 -07:00
scx200_gpio.c
snsc.c various char drivers: remove deprecated IRQF_DISABLED 2013-10-16 12:36:10 -07:00
snsc.h
snsc_event.c various char drivers: remove deprecated IRQF_DISABLED 2013-10-16 12:36:10 -07:00
sonypi.c ACPI: Remove the old /proc/acpi/event interface 2013-07-15 13:56:36 +02:00
tb0219.c
tile-srom.c PTR_RET() is a weird name, and led to some confusing usage. We ended 2013-09-04 17:31:11 -07:00
tlclk.c tlclk: remove deprecated IRQF_DISABLED 2013-10-16 12:36:10 -07:00
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c virtio_console: verify if queue is broken after virtqueue_get_buf() 2013-10-29 11:28:18 +10:30