From patchwork Thu Apr 26 08:53:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 134433 Delivered-To: patches@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1973457lji; Thu, 26 Apr 2018 01:53:29 -0700 (PDT) X-Received: by 2002:a19:434c:: with SMTP id m12-v6mr16741884lfj.120.1524732809238; Thu, 26 Apr 2018 01:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524732809; cv=none; d=google.com; s=arc-20160816; b=CefIRpA1X9nClgc3B9NgOOj0wkKbNUoGef0W59hHMbSuzOng2ocZStZ8lzOlwD+ymo /us2jq3Yr+0PrIxoz6aRmVZyrpX6zHn8ijREkKzKs0Bt6pQymz8Mr3XaO+sshXSSsbIs C7MrZEZTasdBRHHwdTUYOYTDIM6v5hlOSeV9fs4KZtlk4FG0KlsVpBH8BPC8/j1No9dY nQqdNvIBU36op3Xh29nZrcNe0NYU4Ywz8eE2tid0b3yj6097Fa4NhWh69hwI80Likm9z M2Q/QeT5rD+FV7TlBNIOe0cYpT189wYrWub5GBLplUi4cyTkc4CiAcrQ5YIHNwZ+WabY +qPA== 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=rlrpHb/IeX5xP3SDTjra/zpY68YkXnTDM31XH0nhg+w=; b=JNCXwToErg3tY+UYSZcpvbggpywJQPw9bR/VYOYXBvQvJYHtn+vStKnRbK/Q9dZZkD KEbwCzfhhXUdGBDsJPr9mACihtjGxqYGaU1Mzt8xmZqe6rIkoy3qVpIWGBEAJVvvcuZH E5vf2xQ60CrXKbot+GIfonPcMqCcamphnx/qzj/Rx3aiDUEGFbwuuSiQU9r2UFLW/QhJ WTggRacfdpa3Wesx74hezhFqz0WWc6sJRq3HzPLsJ0noRz+hmpS3oeVbKb89kP/yJ8mf BpytRvZccw6NHH0hXi3NXcsK73XkRmZitUflUFVR7IDutIQFt3u9gUjLM4HLAJcTBPS9 YxTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=erboZ726; 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 r10-v6sor4305471lfg.2.2018.04.26.01.53.29 for (Google Transport Security); Thu, 26 Apr 2018 01:53:29 -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=erboZ726; 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=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=DuBry1Vi7FGPIqy/tUjc/dURGXjo+Mm5u+yudWSfruAYH5vxjNYoNZ4ZRu2u+Frntt RFfOuoCVrZlMtsdtK58taLm6V7+tTgIf+FRYYPUpaLlEmVUYJy7e/cavTdBvhr8d7Rs3 xSL2LkMzhBgTqolkEoK1jD1Vb2FUHO4UluAAbwMAOc/96fSL0rvopc/ZXq9MLJ18STI6 PdmrmdNSx9w7z3X0xWhOz65OJke4HZbLRvZt5G6jI97wvwGefWfm3EXCVGbn+TNXESI+ c8OmZOkqEo6wXTR7csmzMRfGeYWyNWSvvrtczt2WTqnxXvD5/kQ1SK6DkXPhi1h+CRsT dPzQ== X-Gm-Message-State: ALQs6tB9xND3ovdOIhjWTfoF42KxBsDSBuIeSBaqNoRYzo4c7snYy6bt iCb1i4X/PiapjM2sckHgN20+K8yS X-Google-Smtp-Source: AB8JxZo4zVxcacJ9yKjlB/IJFq/AqR9WWf+d4AGgC5HSHcYgPfMP7Tn5imDu+bDc+/qfDi1F25griA== X-Received: by 2002:a19:8dd4:: with SMTP id p203-v6mr3651009lfd.137.1524732809021; Thu, 26 Apr 2018 01:53:29 -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.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> 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(-) -- 2.7.4 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);