1
0
Fork 0
alistair23-linux/drivers
Fengguang Wu e47c6a3408 clk: validate pointer in __clk_disable()
clk_get() returns -ENOENT on error and some careless caller might
dereference it without error checking:

In mxc_rnga_remove():

        struct clk *clk = clk_get(&pdev->dev, "rng");

	// ...

        clk_disable(clk);

Since it's insane to audit the lots of existing and future clk users,
let's add a check in the callee to avoid kernel panic and warn about
any buggy user.

Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Viresh Kumar <viresh.kumar@st.com>
Cc: viresh kumar <viresh.linux@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-30 17:25:13 -07:00
..
accessibility
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-07-26 14:28:55 -07:00
amba Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-07-27 15:14:26 -07:00
ata ata/pata_arasan: remove conditional compilation of clk code 2012-07-30 17:25:12 -07:00
atm
auxdisplay
base Driver core merge for 3.6-rc1 2012-07-26 11:25:33 -07:00
bcma Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2012-07-27 11:15:03 -04:00
block Power management updates for 3.6 2012-07-22 13:36:52 -07:00
bluetooth
cdrom
char Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-07-26 14:18:18 -07:00
clk clk: validate pointer in __clk_disable() 2012-07-30 17:25:13 -07:00
clocksource arm-soc: new SoC support 2012-07-23 16:31:31 -07:00
connector
cpufreq Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-07-24 13:34:56 -07:00
cpuidle Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-07-26 14:28:55 -07:00
crypto ARM: SoC fixes 2012-07-26 20:29:52 -07:00
dca
devfreq
dio
dma Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-07-24 17:12:54 -07:00
edac
eisa
extcon
firewire
firmware pcdp: use early_ioremap/early_iounmap to access pcdp table 2012-07-30 17:25:11 -07:00
gpio GPIO changes for v3.6: 2012-07-26 13:56:38 -07:00
gpu Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-07-26 14:18:18 -07:00
hid Merge branch 'next' into for-linus 2012-07-24 22:43:04 -07:00
hsi
hv
hwmon Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-07-24 13:34:56 -07:00
hwspinlock
i2c i2c/i2c-pxa: remove conditional compilation of clk code 2012-07-30 17:25:12 -07:00
ide
idle Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-07-26 14:28:55 -07:00
ieee802154
iio
infiniband InfiniBand/RDMA changes for the 3.6 merge window: 2012-07-24 13:56:26 -07:00
input Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-07-27 15:14:26 -07:00
iommu IOMMU Updates for Linux v3.6-rc1 2012-07-24 16:24:11 -07:00
isdn
leds leds-lp8788: forgotten unlock at lp8788_led_work 2012-07-27 08:16:07 +08:00
lguest
macintosh
md Three fixes for device-mapper discard processing: 2012-07-20 11:51:22 -07:00
media Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-07-24 13:34:56 -07:00
memory
memstick
message
mfd Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux 2012-07-28 13:43:12 -07:00
misc CHAR/MISC patches for 3.6-rc1 2012-07-26 12:15:41 -07:00
mmc ARM: SoC fixes 2012-07-26 20:29:52 -07:00
mtd Merge branch 'v3.5-rc7-fixes' of git://github.com/lunn/linux into fixes 2012-07-25 21:37:09 +02:00
net net/stmmac: remove conditional compilation of clk code 2012-07-30 17:25:12 -07:00
nfc
nubus
of Devicetree updates for 3.6 2012-07-24 14:07:22 -07:00
oprofile
parisc PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
parport
pci PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
pcmcia Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-07-27 15:14:26 -07:00
pinctrl Pin control changes for v3.6: 2012-07-24 14:05:46 -07:00
platform Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-07-26 14:28:55 -07:00
pnp
power Driver core merge for 3.6-rc1 2012-07-26 11:25:33 -07:00
pps
ps3
ptp
rapidio
regulator SCSI misc on 20120724 2012-07-24 18:11:22 -07:00
remoteproc A batch of remoteproc patches for 3.6: 2012-07-26 16:19:08 -07:00
rpmsg A batch of remoteproc patches for 3.6: 2012-07-26 16:19:08 -07:00
rtc Merge branch 'v3.5-rc7-fixes' of git://github.com/lunn/linux into fixes 2012-07-25 21:37:09 +02:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-07-26 18:09:01 -07:00
sbus
scsi Merge branch 'master' [vanilla Linus master] into libata-dev.git/upstream 2012-07-25 15:58:48 -04:00
sfi
sh
sn
spi spi: Updates for 3.6 2012-07-26 12:57:41 -07:00
ssb
staging Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-07-26 14:18:18 -07:00
target iscsi-target: Drop bogus struct file usage for iSCSI/SCTP 2012-07-21 02:44:13 -07:00
tc
thermal Merge branches 'acpi_pad', 'acpica', 'apei-bugzilla-43282', 'battery', 'cpuidle-coupled', 'cpuidle-tweaks', 'intel_idle-ivb', 'ost', 'red-hat-bz-772730', 'thermal', 'thermal-spear' and 'turbostat-v2' into release 2012-07-26 00:03:58 -04:00
tty Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-07-27 15:14:26 -07:00
uio
usb usb/host/r8a66597: remove conditional compilation of clk code 2012-07-30 17:25:12 -07:00
uwb
vhost vhost: make vhost work queue visible 2012-07-22 01:22:23 +03:00
video radeonfb: Add quirk for the graphics adapter in some JSxx 2012-07-27 11:42:33 +10:00
virt
virtio
vlynq
vme
w1 Driver core merge for 3.6-rc1 2012-07-26 11:25:33 -07:00
watchdog Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-07-27 15:14:26 -07:00
xen PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
zorro
Kconfig
Makefile