Thread (1 message) 1 message, 1 author, 2018-09-09

Re: [PATCH] Input: wm97xx: only unregister wm97xx_driver if it has been registered

From: Robert Jarzmik <robert.jarzmik@free.fr>
Date: 2018-09-09 19:09:01
Also in: kernel-janitors, lkml

Charles Keepax [off-list ref] writes:
On Tue, Sep 04, 2018 at 07:35:05PM +0100, Colin King wrote:
quoted
From: Colin Ian King <redacted>

In the case where IS_BUILTIN(CONFIG_AC97_BUS)) is not true, the
wm97xx_driver driver is being unregistered even it has not been
previously registered.  Fix this by only unregistering it if
IS_BUILTIN(CONFIG_AC97_BUS)) is true.  This fixes the warning
message:

[  834.111248] ------------[ cut here ]------------
[  834.111248] Unexpected driver unregister!
[  834.111319] WARNING: CPU: 2 PID: 11749 at drivers/base/driver.c:193 driver_unregister+0x3b/0x40
[  834.111319] Modules linked in: wm97xx_ts(-) ....

..and a stack trace.

To easily reproduce this, load and unload the module on a system where
the hardware is not supported.

Fixes: ae9d1b5fbd7b ("Input: wm97xx: add new AC97 bus support")
Signed-off-by: Colin Ian King <redacted>
---
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

-- 
Robert
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help