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: 134429 Delivered-To: patches@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1973371lji; Thu, 26 Apr 2018 01:53:24 -0700 (PDT) X-Received: by 10.46.151.206 with SMTP id m14mr2900718ljj.102.1524732804269; Thu, 26 Apr 2018 01:53:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524732804; cv=none; d=google.com; s=arc-20160816; b=nG0YOb6VJO9PcjZTEaEMHsQa7PjE+kjeG1D1ztPC1EUpxwb1scnMvNuSVzkBnCG/7+ XAN2Ho6bZIx8MHl4kjFSnT5njKT46e8joblrMvTrIy909ovXySglTGYmahVFLaotjmnD hTgzcuVVDMuDXTL49Iu4DgM5GJ2Wb9xDvYHvN5AKYvF97Rbthv2K4i1fhe1O2AuorNBI E5wTqYzZOzPXAwnMxt+ZbUa596jhJmiOS0KmIhnkqkDK1p/UlxGYlR02mP2MwO/SiDzl 2SmcrVvYtS1B1C1TbmMfzQBAjpq0cLxmIbF37O08RoCscfLnRsqNAH60E5LB1SUy+NId NW5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=soNOtJTU3RLapthGVgaxgE2rq+eWjefBnIsGZ8fdPIU=; b=DnJigYWbI9saHR+Sfkb3TxGmR012VNL7Uko7u7WeQKqsg9YYQMDZRkF26771bdW7U7 ySTii1F2OMX5Lybw53dpcIMYIgYJ2tTV3f635Ld7RW/LzqI76zCFnaYOoWNIdHoMThKT y5kGzRRAlxADhd8EYrnw6guTwn/erZVF7NsJxshxxW7FK0u/mftU5SMTegEO9ijLFOMI FBpVWtAQbHSDN436Vhgeu8lUynJFh3ex4GFMjQDF2nRUFzFOc3d06OzG4YxoE2PpB0hz iTqZcCTNf3QBg/kLVYaBc/vtMTCEzC+q013CDPedV+3QtWXT0pVH8PonPrODgpYeUqBw rFqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XNyT9mzJ; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id m88-v6sor386658lfi.81.2018.04.26.01.53.24 for (Google Transport Security); Thu, 26 Apr 2018 01:53:24 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XNyT9mzJ; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=REZ3VZwZhUY6HpbzwPDY8sZnxF9RheOg/4Y6PnJuYyeWSRopvDNPOZbFtJxifQEY10 JuXGsRcSAJdw9IkE73H45VnGehhHVFpzcnZFVwFMItvVT8C8wApYLHJQjXPRjJmVyH4E 8w5V2eB8Juy8roBKcPyo7kSMombRPwGjjf/QqgdX0yc3TqRscaqNgrYj6sYFjpT6ZucN cSrUyilSAO1O0CIjdO+SQUVTsHY/iacsMB9qwkXsV1rSTNW11CZptoQB5FC4DUCBsJbN 5wGdS20z0ac+jGv/zAW0CwGMOzjpamhnKfddlodbK48zf91KCNH8/qch5Xx92lkqvnX6 zx+Q== X-Gm-Message-State: ALQs6tAzVKnnX2HfgBt7LMFs/iKhHeO6D93MMlZ5T6rxx58LfN//MpDn 5zy7i6nXf/vdan+pI+NPvP2ikL9o 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) Return-Path: 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> 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(-) -- 2.7.4 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; }