Skip to content

Commit d301a71

Browse files
fthaingeertu
authored andcommitted
macintosh/via-macii: Fix "BUG: sleeping function called from invalid context"
The via-macii ADB driver calls request_irq() after disabling hard interrupts. But disabling interrupts isn't necessary here because the VIA shift register interrupt was masked during VIA1 initialization. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Finn Thain <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/419fcc09d0e563b425c419053d02236b044d86b0.1710298421.git.fthain@linux-m68k.org Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent d39d167 commit d301a71

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

drivers/macintosh/via-macii.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,24 +140,19 @@ static int macii_probe(void)
140140
/* Initialize the driver */
141141
static int macii_init(void)
142142
{
143-
unsigned long flags;
144143
int err;
145144

146-
local_irq_save(flags);
147-
148145
err = macii_init_via();
149146
if (err)
150-
goto out;
147+
return err;
151148

152149
err = request_irq(IRQ_MAC_ADB, macii_interrupt, 0, "ADB",
153150
macii_interrupt);
154151
if (err)
155-
goto out;
152+
return err;
156153

157154
macii_state = idle;
158-
out:
159-
local_irq_restore(flags);
160-
return err;
155+
return 0;
161156
}
162157

163158
/* initialize the hardware */

0 commit comments

Comments
 (0)