Received: by 10.192.165.148 with SMTP id m20csp1771791imm; Thu, 26 Apr 2018 01:56:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/KiW+h7XDnRnIMTzOG8uKCFWAmTsZcmYk5v4Y5ppBLnKFjnxDkK8JwmeyqogBrhswDvxx5 X-Received: by 2002:a17:902:760f:: with SMTP id k15-v6mr32507434pll.294.1524732995729; Thu, 26 Apr 2018 01:56:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524732995; cv=none; d=google.com; s=arc-20160816; b=rNbUODiOZMxNwZivO0grizPpySOvOrm1is/Sb1L2J5RlE+LqgUVwECmjArUMUfZPC4 yL2ltHbUcyFF1CwbtO+OxX/LyTDkKqBPtxjf9uPSduRtx1zuLydoEbWhJhdann5dSXEi oMR5rLpo27zycNZTf9/sCa2nTYoE2Cah7T/jr2j32qlnojzM5mh0H6PjR9VWd+1QbQ6P BcXR+28FJLMwoxTX1u9gobWx8vq+fV7u3b1BW9QOZnbhhlAHY/Dewt3F/cONv+ffA8mf NKWI7MsHb7vBqLEsLKmklbkYLol0DztjuYWaTUrerN/KvOzEslxQ8/VvgB+I4w040L6o U/cA== 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=4qRjfjcsNTisdPc2jK1jipH7JeqOKH7dML3l+Hiob5c=; b=a+k3750voAyzkzInXp0Zq75UesPtW0Rlh3G4IArqIWIn+cnho7zV3l5nHhtHD8NYM+ GhNJGLsqBCpxBnohjnXtNZnF+a9DUrm9c5ayYQ8UNZE6LVoi8S1+fyLGtC5tOUsi8dRH 5tT1kKYyY3182T4RK6zQqnw0db8ZmHQxrLIvGqrtyTjvwyZGgTQdY3FRK+WGc13R/irA 9bT1a3f5s4rfGZV89ByLEKMSZsPiojW/Ft1F0Vu+twGp0zVeXwGn/EQWGpTW9rSLYta9 1851cALQSXkgrnc4uDfrL7JtJSKQNLiQbnS15DeIYMibbtuKGDHXtCqhQceh04yEMye9 8RLA== 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: 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 u6-v6si5445474plz.461.2018.04.26.01.56.21; Thu, 26 Apr 2018 01:56:35 -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=Cr+cY3A4; 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 S1754908AbeDZIyj (ORCPT + 99 others); Thu, 26 Apr 2018 04:54:39 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:41917 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754777AbeDZIxb (ORCPT ); Thu, 26 Apr 2018 04:53:31 -0400 Received: by mail-lf0-f67.google.com with SMTP id o123-v6so26957330lfe.8 for ; Thu, 26 Apr 2018 01:53:31 -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=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=h+w8DqHZmn/gVTcZNcjoLC58nOmqJKntFne5I12bPaIe/ib/32qEOAQWa437hb3SoJ Bgi3di3pTJqNfR/otMX4gbd16rZvzUeLATSONL6GplqmMbPBfpyCMKtFjuA1R4sKYlsb OjPFz8jvucvun5A4vL5intOH0tTM1BNgJx9LBGALKt4+e2hgTdMzZs5eYGV3H7knwXD+ gndz7ry/vjpPJLEO7mKdpvvzemYOMqjQTOev90iJ3EQ4q8lhEl3p0UbtRCVi1YVqREjq ohcFyanU3IBTq7sutJKFZJ11TxaqEQ60yI4CVttnfQMd/2WOUekd8fBlGlAWOv55M4oV GjSg== X-Gm-Message-State: ALQs6tD5PcDT4KDCzT8YiITqJIqZnrLSOU7vLgZJPSzLOCccwRbkgMVm 282JCzdWjH5q+8xMcOrzIcM9VQ== X-Received: by 2002:a19:8f06:: with SMTP id r6-v6mr17093851lfd.56.1524732810431; Thu, 26 Apr 2018 01:53:30 -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.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> 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: Mark Brown Signed-off-by: Ulf Hansson --- drivers/spi/spi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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; } -- 2.7.4