From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [v4,1/9] ACPI / PM: Let acpi_dev_pm_detach() return an error code Date: Fri, 12 Sep 2014 14:05:53 -0700 Message-ID: <20140912210553.GA27924@core.coreip.homeip.net> References: <1410262570-22785-2-git-send-email-ulf.hansson@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1410262570-22785-2-git-send-email-ulf.hansson@linaro.org> Sender: linux-acpi-owner@vger.kernel.org To: Ulf Hansson Cc: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Greg Kroah-Hartman , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, Kevin Hilman , Russell King , Philipp Zabel , Geert Uytterhoeven , Wolfram Sang , Stephen Boyd , Linus Walleij , Daniel Lezcano , Magnus Damm , Tomasz Figa , Chris Ball , linux-acpi@vger.kernel.org, Simon Horman , Alan Stern , Mark Brown , Ben Dooks , Kukjin Kim , linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org Hi Ulf, On Tue, Sep 09, 2014 at 01:36:02PM +0200, Ulf Hansson wrote: > To give callers the option of acting on a errors while removing the > pm_domain ops for the device in the ACPI PM domain, let > acpi_dev_pm_detach() return an int to provide the error code. So how would callers handle the errors? As far as I can see acpi_dev_pm_detach() is called from ->remove() and ->shutdown() methods, where there is no meaningful strategy to handle errors as you are past the point of no return and you keep on tearing down the device. Thanks. -- Dmitry