From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Jarzmik Subject: Re: [PATCH] Input: wm97xx: only unregister wm97xx_driver if it has been registered Date: Sun, 09 Sep 2018 21:08:53 +0200 Message-ID: <87o9d65vzu.fsf@belgarion.home> References: <20180904183505.10693-1-colin.king@canonical.com> <20180905091609.GC1653@imbe.wolfsonmicro.main> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20180905091609.GC1653@imbe.wolfsonmicro.main> (Charles Keepax's message of "Wed, 5 Sep 2018 10:16:09 +0100") Sender: linux-kernel-owner@vger.kernel.org To: Charles Keepax Cc: Colin King , Charles Keepax , Mark Brown , Mauro Carvalho Chehab , patches@opensource.cirrus.com, linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-input@vger.kernel.org Charles Keepax writes: > On Tue, Sep 04, 2018 at 07:35:05PM +0100, Colin King wrote: >> From: Colin Ian King >> >> 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 >> --- > > Acked-by: Charles Keepax Acked-by: Robert Jarzmik Cheers. -- Robert