1
0
Fork 0
alistair23-linux/drivers
Thomas Gleixner 35c64e5d13 drivers: serial: apbuart: Handle OF failures gracefully
The apbuart driver depends on OF and relies on everything being
available. So if it's probed on a platform which has OF support, but
no device tree is available it crashes. Triggered by the upcoming x86
OF support in randconfig testing.

Further it's inconsistent vs. the probing and exiting from the
of_match loop.

Make it robust and consistent:

 - check the availablility of OF nodes before dereferencing
 - return -ENODEV when the device tree lookup fails
 - return -ENODEV when no uart port configuration is found
 - return -ENODEV when invalid uart port configuration is found

Remove the enum_done check while at it. Driver init functions are only
called once. Remove the pointless vendor and device queries as well.

Reported-by: Ingo Molnar <mingo.elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Kristoffer Glembo <kristoffer@gaisler.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-16 13:14:32 -08:00
..
accessibility
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2010-10-26 17:28:37 -07:00
amba
ata ATA: pata_octeon_cf: Use I/O clock rate for timing calculations. 2010-10-29 19:08:41 +01:00
atm drivers/atm/eni.c: Remove multiple uses of KERN_<level> 2010-10-26 11:35:37 -07:00
auxdisplay
base Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 2010-10-29 15:09:56 -07:00
block floppy: fix another use-after-free 2010-11-06 07:49:56 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-10-23 11:47:02 -07:00
cdrom cdrom: gdrom: ctrl_in/outX to __raw_read/writeX conversion. 2010-10-27 14:33:39 +09:00
char ip2: fix compiler warning on ip2main_pci_tbl 2010-12-10 15:20:15 -08:00
clocksource ARM: shmobile: remove sh_timer_config clk member 2010-10-31 10:40:39 -04:00
connector connector: remove lazy workqueue creation 2010-10-24 14:20:01 -07:00
cpufreq [CPUFREQ] add sampling_down_factor tunable to improve ondemand performance 2010-10-22 11:44:47 -04:00
cpuidle
crypto replace nested max/min macros with {max,min}3 macro 2010-10-26 16:52:12 -07:00
dca
dio
dma drivers/dma/Kconfig: add part number for Topcliff. 2010-10-29 14:14:02 -07:00
edac Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/i7core 2010-10-26 10:13:48 -07:00
eisa
firewire Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2010-11-05 14:17:22 -07:00
firmware dmi: log board, system, and BIOS information 2010-10-27 18:03:05 -07:00
gpio gpio: Add VIA VX855 GPIO driver 2010-10-29 00:29:51 +02:00
gpu Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2010-10-27 20:37:06 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2010-10-25 07:59:01 -07:00
hwmon hwmon: (ltc4261) Fix error message format 2010-11-05 10:17:19 -07:00
i2c i2c-i801: Add PCI idents for Patsburg 'IDF' SMBus controllers 2010-10-31 21:07:00 +01:00
ide ide: clean up timed out request handling 2010-10-26 10:17:30 -07:00
idle Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6 2010-10-26 17:28:07 -07:00
ieee802154
infiniband convert get_sb_single() users 2010-10-29 04:16:28 -04:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2010-10-31 21:02:39 -04:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2010-11-05 15:25:48 -07:00
leds leds-net5501: taints kernel, add license 2010-11-05 09:51:56 -07:00
lguest
macintosh Move ams driver to macintosh 2010-10-28 20:31:50 +02:00
mca
md md: tidy up device searches in read_balance. 2010-10-29 16:40:33 +11:00
media Input: ir-keytable - fix uninitialized variable warning 2010-10-31 21:05:43 -04:00
memstick
message Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2010-10-22 17:34:15 -07:00
mfd mfd: Fix a memory leak when unload mc13xxx-core module 2010-10-29 00:30:43 +02:00
misc Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb 2010-10-29 11:49:38 -07:00
mmc mfd: Adding twl6030 mmc card detect support for MMC1 2010-10-29 00:29:59 +02:00
mtd Merge git://git.infradead.org/mtd-2.6 2010-10-30 08:31:35 -07:00
net ipw2x00: remove the right /proc/net entry 2010-11-05 18:57:04 -07:00
nubus
of of/mips: Cleanup some include directives/files. 2010-10-21 11:10:11 -06:00
oprofile Merge branches 'perf-fixes-for-linus' and 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-30 11:43:26 -07:00
parisc Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6 2010-10-28 09:24:14 -07:00
parport Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
pci Merge branch 'stable/xen-pcifront-0.8.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2010-10-28 17:11:17 -07:00
pcmcia Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
platform Remove duplicate includes from many files 2010-10-27 18:03:18 -07:00
pnp Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2010-10-26 17:28:37 -07:00
power power: Revert "power_supply: Mark twl4030_charger as broken" 2010-10-29 00:30:44 +02:00
pps
ps3
rapidio rapidio: fix destructive port EM initialization for Tsi568 2010-10-27 18:03:16 -07:00
regulator regulator: max8998 BUCK1/2 voltage change with use of GPIOs 2010-10-29 00:30:15 +02:00
rtc sh: mach-snapgear: Kill off machtype, consolidate board def. 2010-10-29 19:06:53 +09:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2010-10-31 20:43:12 -04:00
sbus Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-10-25 08:19:14 -07:00
scsi [SCSI] pmcraid: add support for set timestamp command and other fixes 2010-10-29 12:03:01 -05:00
serial drivers: serial: apbuart: Handle OF failures gracefully 2010-12-16 13:14:32 -08:00
sfi
sh Merge branches 'sh/pio-death', 'sh/nommu', 'sh/clkfwk', 'sh/core' and 'sh/intc-extension' into sh-fixes-for-linus 2010-11-08 09:42:43 +09:00
sn
spi Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 2010-11-01 07:50:43 -04:00
ssb
staging Staging: ath6kl: remove empty files that mess with 'distclean' 2010-11-06 11:27:04 -07:00
tc
telephony Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
thermal
tty n_gsm: clean up printks 2010-11-11 11:35:58 -08:00
uio Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2010-11-05 15:25:48 -07:00
uwb uwb: Remove the WLP subsystem and drivers 2010-10-25 14:03:45 +01:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-10-23 11:47:02 -07:00
video VIDEO: xen-fb, switch to for_each_console 2010-11-16 12:50:17 -08:00
virtio
vlynq
w1 w1: don't allow arbitrary users to remove w1 devices 2010-10-27 18:03:17 -07:00
watchdog WATCHDOG: octeon-wdt: Use I/O clock rate for timing calculations. 2010-10-29 19:08:42 +01:00
xen convert get_sb_single() users 2010-10-29 04:16:28 -04:00
zorro zorro: Fix device_register() error handling 2010-10-22 09:43:25 +02:00
Kconfig
Makefile TTY: create drivers/tty and move the tty core files there 2010-11-05 08:10:33 -07:00