Received: by 10.192.165.148 with SMTP id m20csp1773524imm; Thu, 26 Apr 2018 01:58:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpXXdqpUGPlX3u5Rt96tfuxO91Z9rhtwNOH1UV8ysJztYT5JF1c62tpfOsVwbnFpba+6FUG X-Received: by 10.101.64.3 with SMTP id f3mr3601914pgp.359.1524733119850; Thu, 26 Apr 2018 01:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524733119; cv=none; d=google.com; s=arc-20160816; b=rdgIyb7t7QrYK8MSfTp+S+tbFzDD7Kr882OYPkhja1cbXA4Z8WPk8lqA7iMkANXH4i tMpBYnMvCJKcTDKmAqdiM4Pc2/FnZwsPAMQkYbrtketLlhTuuDYE2vh65muEXY2su9pb 1ewx+48CR4o+Gv+CkrgUQh2L0EZFWqdGco2TSu8P8M5WFGou6UN3f822q+s4DKIuPO6D ED56Y3dlyf/sMxfzuufTtVFR129Q/Ir+RPfTxK3qTzuk5qaNTLZ2FGDyED+cCL0T/hSL hSl5IAK89owl8wqk/7dHOex2twEohbV9FnSVHGw4DtpQ1Rw21+UO+w9kekV0ae5QYjDp vWVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=rlrpHb/IeX5xP3SDTjra/zpY68YkXnTDM31XH0nhg+w=; b=t7ZAUNV3bY6s31eylojb6OZq2nq/Uva/A3Rh+9NCEO2EWIIJNh+S0qztJA5J+N8XEd YlYKgy/lA6/wbsn/rDPDbY/qsf4ax5Ie9YWGVH23tnxMJggdZwnv+5RFUzVtKckekIQe IhK3cXJQ67eLfyZuVQ4tnfoWQhLRAQb7BSU3N5YmFrIXyrfi+DT12Hd9Af8rO3jQNbvQ 1fWM4LldAdSxnVTo8Sdq3u+boeVRTM+uM+EhdS+lCoQch1BLO+AhnYimcFtHWLhqhzLn vQYZb6kgg0axsX2QFdmq3IIdCs5c7bqeg5owHI7OVv10skS0qfYBZGqOIe5qTeSt6D/S KcdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=erboZ726; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w65si170099pfa.18.2018.04.26.01.58.25; Thu, 26 Apr 2018 01:58:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=erboZ726; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754943AbeDZIyq (ORCPT + 99 others); Thu, 26 Apr 2018 04:54:46 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:38146 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754774AbeDZIxa (ORCPT ); Thu, 26 Apr 2018 04:53:30 -0400 Received: by mail-lf0-f68.google.com with SMTP id z130-v6so29546507lff.5 for ; Thu, 26 Apr 2018 01:53:29 -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=rlrpHb/IeX5xP3SDTjra/zpY68YkXnTDM31XH0nhg+w=; b=erboZ726gLb32PLZTg+zkx7X3M1NsEd2Otmi4MtLIBl3FQu2qsH7HMyqy7gOY0SR1h Ztof8dJRE3lAPsjQgjMQR8jGHKjRKqeDmJW5ZnLfam6z+EcJMru4RBZ1wm7kU6t7TDmV xXrEujyGJp6nko5wdATO1OR8cqgvGnCGmYo2E= 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=rlrpHb/IeX5xP3SDTjra/zpY68YkXnTDM31XH0nhg+w=; b=i77S9o42q29PKMV6e+T+b+5YdtVm2YR6L/WXdLFAcUKvuJ/ZLSqLGTZQRuC7NvGKvZ olpRc/4C8GQDoIDT8kHddTPYSNWmzyXo23JOuPUDIAFx8YS8+dTiEujWxKAiLFllxZwP HvUdGvxvztfdjbeObkyWRBxLgUT9NWdXofFNeYAWNpmjDuNMDcx1TX4dt6+FQmDI8Zno VF96bYscwAw55zY1APS5Yz0FaBh1/ZueAUqUImE/ovScPAxYRqsL1DC8BRsHFUErxDMJ j3q9Y933YBZL39iB6qpiV11rFZkoaqa6PuPHNT6KxujCrFTz8Klu82FB3PXza1Cht1dY vHjw== X-Gm-Message-State: ALQs6tABGBQdwh0pTo9N4pwnBv4JmkwWL4AaUYU7E16IFF6Q5b2ridsA tkNf8JRXbtpr5pY5nStbRU04Tw== X-Received: by 2002:a19:8dd4:: with SMTP id p203-v6mr3651009lfd.137.1524732809021; Thu, 26 Apr 2018 01:53:29 -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.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Apr 2018 01:53:28 -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 10/11] soundwire: Respect all error codes from dev_pm_domain_attach() Date: Thu, 26 Apr 2018 10:53:09 +0200 Message-Id: <1524732790-2234-11-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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: Vinod Koul Cc: Sanyog Kale Cc: Pierre-Louis Bossart Signed-off-by: Ulf Hansson --- drivers/soundwire/bus_type.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c index d5f3a70..283b283 100644 --- a/drivers/soundwire/bus_type.c +++ b/drivers/soundwire/bus_type.c @@ -83,17 +83,16 @@ static int sdw_drv_probe(struct device *dev) * attach to power domain but don't turn on (last arg) */ ret = dev_pm_domain_attach(dev, false); - if (ret != -EPROBE_DEFER) { - ret = drv->probe(slave, id); - if (ret) { - dev_err(dev, "Probe of %s failed: %d\n", drv->name, ret); - dev_pm_domain_detach(dev, false); - } - } - if (ret) return ret; + ret = drv->probe(slave, id); + if (ret) { + dev_err(dev, "Probe of %s failed: %d\n", drv->name, ret); + dev_pm_domain_detach(dev, false); + return ret; + } + /* device is probed so let's read the properties now */ if (slave->ops && slave->ops->read_prop) slave->ops->read_prop(slave); -- 2.7.4