From patchwork Thu Apr 26 08:53:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 134434 Delivered-To: patches@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1973478lji; Thu, 26 Apr 2018 01:53:30 -0700 (PDT) X-Received: by 2002:a19:10c1:: with SMTP id 62-v6mr16787581lfq.76.1524732810669; Thu, 26 Apr 2018 01:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524732810; cv=none; d=google.com; s=arc-20160816; b=pZecdG80ycm3iMHcZkAQGCSofd1dO9BLPqIL01TB+igPkpZ2B3kXpFazB+AjwgFMBh prU6sUWvi6HY1bmhGdKIYr96jP7G4vLarXueDDKCDA9rdGooK2JcLhLmFLfY/x853Wby KrzAoyDBQb0uiAdurvTxScyRCYEbaRAdCP1+zOw844ZuU6HY+Y5q5gXg+enQqxwX2U8k 0kMWJabSj6F/JEcg0i1kL8il6TuzQiygYa5+SCVvEkJOkqKvaNwwhUjasQqRQcdg9nfC uBKSzsZdD8jOUHwIm25UQ0aS+V5549xgsaMKoRk0lkaV+L6Tk5zvqDZxDTQPGXhEeEr6 78dA== 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=4qRjfjcsNTisdPc2jK1jipH7JeqOKH7dML3l+Hiob5c=; b=FK33/A0kHM/ypzKDr1Vyn9DZqhqkG/5WJeTaHSb75P9nOjrQ4Ka9KugvCJHAPviQYK Fea43GniAsAAJwYZjXmf32eusoCP5zVsuQphdcMjwhF/GpkGFoyxnK6ErbN6NQmEQWnO HpFy+MbZZjw76soCNWokmRRvxTJxW4njBh28kLtvzWIS82I4GT4Wvx/A0NOalzNsD5V5 vvGm3cd5NerL/JNyjhf5HpET9qjrU/oNy0G0RY+93AIPbpb3/lXD6tt/L3DUXVCugibv bBVg7qbRkIB81HVLVZQZ9pZrEqHTgtrM6nO6v8exEZRrGHA5NVLEz5R48LzNgofj/uAK mL+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cr+cY3A4; 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 t142-v6sor4569226lfe.52.2018.04.26.01.53.30 for (Google Transport Security); Thu, 26 Apr 2018 01:53:30 -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=Cr+cY3A4; 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=4qRjfjcsNTisdPc2jK1jipH7JeqOKH7dML3l+Hiob5c=; b=Cr+cY3A453fhyYe6SnBd+HXPJoxr1ZAjXPrKlbWCjDFHpolEbfuqV5Z6yBE9OMYpAX AaDJWruyyCIxaJxD5ncc2uOo2j6y1DpgQ6DW+7FSffZHIzs3y7haaCEke+K9Gfp+1uio gTAQx3zWR9bNEIEIrRCfMz+n3K1JMKg1WX3r4= 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=4qRjfjcsNTisdPc2jK1jipH7JeqOKH7dML3l+Hiob5c=; b=Prl70nfi14hW7yp3WjBkSIWniA4e/MuvAJNaVZL1AdH3BkcEJ2yAYHvObvmi24LFOY BOkCEkJ96HMbKc+Q+1bo+uovi+jNN04UU+YvON176CydxB9y25U2MkMVDRm6wAp+AUp+ cilUmtgYVJUxfxEEfyTJ/OWfty/crN+wJGsQiUvzD530myGOwmcKBLfg8Ol4PS2DpnsF AIcvXpLwVZj6EBuvsv2riLfZifzxbKGyEdsF80tgp3i0vgmmq8562g+Pr+bp9xUfseKF b5D2P1nLZ3PBqdCaAi/qlB/KpHOkeQEJAalneo4puEp3PLXGVoidWrKxINtKjhnuHsQ+ 7tuA== X-Gm-Message-State: ALQs6tDZVu5KonVdbiNbPVVBy0e5DE86aULl7KIk+pslF7Fnl4iRAcSc wJcG3p5RTkbXH2WZPk+2A6LFjtfw X-Google-Smtp-Source: AB8JxZr0FO6Dc/su+Yv7xk87b2fh/iPmzRVQyBUX/0+XYx44xeHrK+u+tntfi29r1fL+O9Zg15yaOg== X-Received: by 2002:a19:8f06:: with SMTP id r6-v6mr17093851lfd.56.1524732810431; Thu, 26 Apr 2018 01:53:30 -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.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Apr 2018 01:53:29 -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 11/11] spi: Respect all error codes from dev_pm_domain_attach() Date: Thu, 26 Apr 2018 10:53:10 +0200 Message-Id: <1524732790-2234-12-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: Mark Brown Signed-off-by: Ulf Hansson --- drivers/spi/spi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 7b213fa..eeab67f 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -356,11 +356,12 @@ static int spi_drv_probe(struct device *dev) } ret = dev_pm_domain_attach(dev, true); - if (ret != -EPROBE_DEFER) { - ret = sdrv->probe(spi); - if (ret) - dev_pm_domain_detach(dev, true); - } + if (ret) + return ret; + + ret = sdrv->probe(spi); + if (ret) + dev_pm_domain_detach(dev, true); return ret; }