From patchwork Thu Apr 26 08:53:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 10364997 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 218A9602DC for ; Thu, 26 Apr 2018 08:53:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 122CD2907F for ; Thu, 26 Apr 2018 08:53:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06C872908D; Thu, 26 Apr 2018 08:53:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 825DE2907F for ; Thu, 26 Apr 2018 08:53:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754781AbeDZIxd (ORCPT ); Thu, 26 Apr 2018 04:53:33 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:38134 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754743AbeDZIxZ (ORCPT ); Thu, 26 Apr 2018 04:53:25 -0400 Received: by mail-lf0-f68.google.com with SMTP id z130-v6so29546156lff.5 for ; Thu, 26 Apr 2018 01:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=soNOtJTU3RLapthGVgaxgE2rq+eWjefBnIsGZ8fdPIU=; b=XNyT9mzJnUkGkoFXZutUPqR6OUTdzK7zOJtCsxtOa4FzXYXviyirFT13T/Udc9yQn4 guB3FCR/XQKjsCm3Bex2FGOY08H959IC2f8xPmw+Tq6U4nLaJrFI8eOKZmlnIIe0ONtU 9+mwEATHkJkNqOfN2ZiFRaJ39a2GeuDi+XgJY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=soNOtJTU3RLapthGVgaxgE2rq+eWjefBnIsGZ8fdPIU=; b=QWgt9nR8vUdwWoXQ5EydecUBm5bFLywW91qLJb7oVbelpsbK7pP/Xjbv5cA/L6/H1K YFZOTR4I6vjmT1N2h+jpTqkAb3ZyibYiQarxzUCzTdtwIgPT1IX3PnRYxR3deQxiTTGp XZ/gr0PJQP0VEqYJGi/fX+DeDGSngVQ1NH4Ck0qPKsHGKEz0IzADlsNI2jQhHb6TBq33 Vk2u7K8zCscicmxYpevPfVWSfsLPVMuNFcn0ShBET0+fYjp6lLgQaCSPrsGA7aoXhbQT Q088kPo0wQZVv7VwJLKvfJCWDV6ESQLwmBDzpX7hntSl5uVkw7y+pO+cyMrzY8jbvdP4 hhTA== X-Gm-Message-State: ALQs6tD7eEzTtxxDt2ZDWq7ztNY3JD9CkEHHjUtHeMHdJibfLEE/k7NV t1zMoNuLIkmRY7cI2pSx1xqmeg== X-Google-Smtp-Source: AB8JxZpUUskqWy8u6tjl2FAxw4EfS+g2nkLhpili7g5TEQVTRxrLN9JQ6GyyueALctaQCs06aqn/+Q== X-Received: by 2002:a19:dd83:: with SMTP id w3-v6mr16829692lfi.82.1524732804044; Thu, 26 Apr 2018 01:53:24 -0700 (PDT) Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id u83-v6sm681097lff.65.2018.04.26.01.53.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Apr 2018 01:53:23 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Greg Kroah-Hartman , linux-pm@vger.kernel.org Cc: Ulf Hansson , Kevin Hilman , Geert Uytterhoeven , Viresh Kumar , Vincent Guittot , Mark Brown , Vinod Koul , Sanyog Kale , Pierre-Louis Bossart , Wolfram Sang , Russell King , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 06/11] amba: Respect all error codes from dev_pm_domain_attach() Date: Thu, 26 Apr 2018 10:53:05 +0200 Message-Id: <1524732790-2234-7-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524732790-2234-1-git-send-email-ulf.hansson@linaro.org> References: <1524732790-2234-1-git-send-email-ulf.hansson@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The limitation of being able to check only for -EPROBE_DEFER from dev_pm_domain_attach() has been removed. Hence let's respect all error codes and bail out accordingly. Cc: Russell King Signed-off-by: Ulf Hansson --- drivers/amba/bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 594c228..79fcbff 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -243,7 +243,7 @@ static int amba_probe(struct device *dev) break; ret = dev_pm_domain_attach(dev, true); - if (ret == -EPROBE_DEFER) + if (ret) break; ret = amba_get_enable_pclk(pcdev); @@ -370,7 +370,7 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent) } ret = dev_pm_domain_attach(&dev->dev, true); - if (ret == -EPROBE_DEFER) { + if (ret) { iounmap(tmp); goto err_release; }