From patchwork Sun Jan 30 12:38:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Achatz X-Patchwork-Id: 517771 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0UCdJLw003905 for ; Sun, 30 Jan 2011 12:40:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754376Ab1A3Mjc (ORCPT ); Sun, 30 Jan 2011 07:39:32 -0500 Received: from mail-in-03.arcor-online.net ([151.189.21.43]:56041 "EHLO mail-in-03.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753427Ab1A3Mih (ORCPT ); Sun, 30 Jan 2011 07:38:37 -0500 Received: from mail-in-17-z2.arcor-online.net (mail-in-17-z2.arcor-online.net [151.189.8.34]) by mx.arcor.de (Postfix) with ESMTP id 4470AD7E55; Sun, 30 Jan 2011 13:38:36 +0100 (CET) Received: from mail-in-15.arcor-online.net (mail-in-15.arcor-online.net [151.189.21.55]) by mail-in-17-z2.arcor-online.net (Postfix) with ESMTP id 3BBE13663F8; Sun, 30 Jan 2011 13:38:36 +0100 (CET) Received: from [192.168.0.7] (dslb-084-057-063-232.pools.arcor-ip.net [84.57.63.232]) (Authenticated sender: screamingfist@arcor.de) by mail-in-15.arcor-online.net (Postfix) with ESMTPSA id 863F61AB5F8; Sun, 30 Jan 2011 13:38:35 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-15.arcor-online.net 863F61AB5F8 Subject: [PATCH 7/8] HID: roccat: Fixed NULL pointer dereference when unloading module From: Stefan Achatz Reply-To: erazor_de@users.sourceforge.net To: Randy Dunlap , Jiri Kosina , Stefan Achatz , Mauro Carvalho Chehab , Hans Verkuil , Greg Kroah-Hartman , Andrew Morton , Thomas Weber , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Date: Sun, 30 Jan 2011 13:38:27 +0100 Message-ID: <1296391107.2283.186.camel@neuromancer> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 (2.30.3-1.fc13) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 30 Jan 2011 12:40:33 +0000 (UTC) diff --git a/drivers/hid/hid-roccat-arvo.c b/drivers/hid/hid-roccat-arvo.c index 7b9a992..75f532f 100644 --- a/drivers/hid/hid-roccat-arvo.c +++ b/drivers/hid/hid-roccat-arvo.c @@ -438,8 +438,8 @@ static int __init arvo_init(void) static void __exit arvo_exit(void) { - class_destroy(arvo_class); hid_unregister_driver(&arvo_driver); + class_destroy(arvo_class); } module_init(arvo_init); diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c index 5cdb282..d749796 100644 --- a/drivers/hid/hid-roccat-kone.c +++ b/drivers/hid/hid-roccat-kone.c @@ -844,8 +844,8 @@ static int __init kone_init(void) static void __exit kone_exit(void) { - class_destroy(kone_class); hid_unregister_driver(&kone_driver); + class_destroy(kone_class); } module_init(kone_init); diff --git a/drivers/hid/hid-roccat-koneplus.c b/drivers/hid/hid-roccat-koneplus.c index 7367e4e..ac20107 100644 --- a/drivers/hid/hid-roccat-koneplus.c +++ b/drivers/hid/hid-roccat-koneplus.c @@ -774,8 +774,8 @@ static int __init koneplus_init(void) static void __exit koneplus_exit(void) { - class_destroy(koneplus_class); hid_unregister_driver(&koneplus_driver); + class_destroy(koneplus_class); } module_init(koneplus_init); diff --git a/drivers/hid/hid-roccat-kovaplus.c b/drivers/hid/hid-roccat-kovaplus.c index 7664e2c..4eeb62f 100644 --- a/drivers/hid/hid-roccat-kovaplus.c +++ b/drivers/hid/hid-roccat-kovaplus.c @@ -703,8 +703,8 @@ static int __init kovaplus_init(void) static void __exit kovaplus_exit(void) { - class_destroy(kovaplus_class); hid_unregister_driver(&kovaplus_driver); + class_destroy(kovaplus_class); } module_init(kovaplus_init); diff --git a/drivers/hid/hid-roccat-pyra.c b/drivers/hid/hid-roccat-pyra.c index be4daa9..02a7243 100644 --- a/drivers/hid/hid-roccat-pyra.c +++ b/drivers/hid/hid-roccat-pyra.c @@ -685,8 +685,8 @@ static int __init pyra_init(void) static void __exit pyra_exit(void) { - class_destroy(pyra_class); hid_unregister_driver(&pyra_driver); + class_destroy(pyra_class); } module_init(pyra_init);