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.

m68k: Some input drivers do not check the platform

Some input drivers do not check whether they're actually running on the
correct platform, causing multi-platform kernels to crash if they are not.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Geert Uytterhoeven and committed by
Linus Torvalds
eb98630b 0f734484

+14
+4
drivers/input/keyboard/hilkbd.c
··· 217 217 return -ENOMEM; 218 218 219 219 #if defined(CONFIG_HP300) 220 + if (!MACH_IS_HP300) { 221 + err = -ENODEV; 222 + goto err1; 223 + } 220 224 if (!hwreg_present((void *)(HILBASE + HIL_DATA))) { 221 225 printk(KERN_ERR "HIL: hardware register was not found\n"); 222 226 err = -ENODEV;
+5
drivers/input/misc/hp_sdc_rtc.c
··· 691 691 { 692 692 int ret; 693 693 694 + #ifdef __mc68000__ 695 + if (!MACH_IS_HP300) 696 + return -ENODEV; 697 + #endif 698 + 694 699 init_MUTEX(&i8042tregs); 695 700 696 701 if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr)))
+5
drivers/input/serio/hp_sdc_mlc.c
··· 306 306 { 307 307 hil_mlc *mlc = &hp_sdc_mlc; 308 308 309 + #ifdef __mc68000__ 310 + if (!MACH_IS_HP300) 311 + return -ENODEV; 312 + #endif 313 + 309 314 printk(KERN_INFO PREFIX "Registering the System Domain Controller's HIL MLC.\n"); 310 315 311 316 hp_sdc_mlc_priv.emtestmode = 0;