From patchwork Thu Feb 7 21:19:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Toshi Kani X-Patchwork-Id: 2113471 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 5C5FADFB7B for ; Thu, 7 Feb 2013 21:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161023Ab3BGVaE (ORCPT ); Thu, 7 Feb 2013 16:30:04 -0500 Received: from g5t0006.atlanta.hp.com ([15.192.0.43]:21348 "EHLO g5t0006.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161008Ab3BGVaE (ORCPT ); Thu, 7 Feb 2013 16:30:04 -0500 Received: from g5t0029.atlanta.hp.com (g5t0029.atlanta.hp.com [16.228.8.141]) by g5t0006.atlanta.hp.com (Postfix) with ESMTP id 50BE4C35C; Thu, 7 Feb 2013 21:30:03 +0000 (UTC) Received: from misato.fc.hp.com (misato.fc.hp.com [16.71.12.41]) by g5t0029.atlanta.hp.com (Postfix) with ESMTP id BBE2C203BD; Thu, 7 Feb 2013 21:30:02 +0000 (UTC) From: Toshi Kani To: rjw@sisk.pl, linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, isimatu.yasuaki@jp.fujitsu.com, Toshi Kani Subject: [PATCH] ACPI: Unbind ACPI drv when probe failed Date: Thu, 7 Feb 2013 14:19:13 -0700 Message-Id: <1360271953-15643-1-git-send-email-toshi.kani@hp.com> X-Mailer: git-send-email 1.7.11.7 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org When acpi_device_install_notify_handler() failed in acpi_device_probe(), it calls acpi_drv->ops.remove() and fails the probe. However, the ACPI driver is left bound to the acpi_device. Fix it by clearing the driver and driver_data fields. Signed-off-by: Toshi Kani --- This patch is based on linux-pm.git/bleeding-edge. --- drivers/acpi/scan.c | 2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index d6caf1d..39659bb 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -627,6 +627,8 @@ static int acpi_device_probe(struct device * dev) if (ret) { if (acpi_drv->ops.remove) acpi_drv->ops.remove(acpi_dev); + acpi_dev->driver = NULL; + acpi_dev->driver_data = NULL; return ret; } }