From patchwork Sun Sep 26 12:14:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Ruikar X-Patchwork-Id: 209942 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 o8QCFJqb018832 for ; Sun, 26 Sep 2010 12:15:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757521Ab0IZMPR (ORCPT ); Sun, 26 Sep 2010 08:15:17 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:46854 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756927Ab0IZMPQ (ORCPT ); Sun, 26 Sep 2010 08:15:16 -0400 Received: by pvg2 with SMTP id 2so1023903pvg.19 for ; Sun, 26 Sep 2010 05:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=yp67oAulF2xzfGmWlFVHRO3TWGbArFlI1YU1i6QJoSg=; b=Tymu/REsmHXkimVJo3TAAyMM2WZHe349PUZwhHiJyLBDy1wgOfyn33vlCrlVgA6rB2 KRFxi8MgtO2dAw56iOLLq1RUlpKKBXfTuoMKVKVu713Tyri+46J8r/RjG2BGnbmPM+Tw b52pxVVq50ec8CT4SefBxqwws4/L8EgoW+QTI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=w9zhPiPGAzXj8Ne9hAi37GUXoxXviDem6AB1++ty/fN9/3eE0GmOSxcJTY64XUuYTv JoVWz+SlmaH9tn8S7dewDyDSjEgLzezCnPyjhcTT/Jrn+i/QTwKlycYAHrvpOsdQlXeJ uzF/fCZoPoxlG541lFXqkdWCHcWwHn1QtId1U= Received: by 10.142.60.11 with SMTP id i11mr5076572wfa.97.1285503316005; Sun, 26 Sep 2010 05:15:16 -0700 (PDT) Received: from localhost.localdomain ([122.163.149.225]) by mx.google.com with ESMTPS id v6sm5679051wfg.15.2010.09.26.05.15.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 26 Sep 2010 05:15:15 -0700 (PDT) From: Rahul Ruikar To: dmitry.torokhov@gmail.com, nm127@freemail.hu Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Rahul Ruikar Subject: [PATCH] input: gameport: emu10k1-gp: call pci_disable_device in error path and in remove() Date: Sun, 26 Sep 2010 17:44:45 +0530 Message-Id: <1285503285-6219-1-git-send-email-rahul.ruikar@gmail.com> X-Mailer: git-send-email 1.7.2.3 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.3 (demeter1.kernel.org [140.211.167.41]); Sun, 26 Sep 2010 12:15:20 +0000 (UTC) diff --git a/drivers/input/gameport/emu10k1-gp.c b/drivers/input/gameport/emu10k1-gp.c index 7392992..34615d4 100644 --- a/drivers/input/gameport/emu10k1-gp.c +++ b/drivers/input/gameport/emu10k1-gp.c @@ -77,6 +77,7 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id if (!emu || !port) { printk(KERN_ERR "emu10k1-gp: Memory allocation failed\n"); release_region(ioport, iolen); + pci_disable_device(pdev); kfree(emu); gameport_free_port(port); return -ENOMEM; @@ -105,6 +106,7 @@ static void __devexit emu_remove(struct pci_dev *pdev) gameport_unregister_port(emu->gameport); release_region(emu->io, emu->size); + pci_disable_device(pdev); kfree(emu); }