Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp971215yba; Wed, 24 Apr 2019 12:41:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvn+MmGEdgnDnkcsqdU239IB1IBaxJu5w94YQQrEcfwNPXRcLhCuUuenq4ZKiLL5UjFODT X-Received: by 2002:a65:6259:: with SMTP id q25mr32497585pgv.103.1556134906803; Wed, 24 Apr 2019 12:41:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556134906; cv=none; d=google.com; s=arc-20160816; b=mRNsBpcMRnxF40slrdCEY/2NU1LLERRJm8WZPmr+Crh6KBSLqEFyGoQKS0+iD9ylFd nBfw8jkHJKXACXTWXezCMM76wfw2tIPJOIOuTtD4u/h2+8QyMU/PHETK+Vgp2XLGALEk 0i5zqWBacNy8awvJ7IRV/6gMPdT4EKa0Mfw4O4fQPGk36ScY+uTcuP333EOGDLOo1TeX 9dxxBYuXrpu8OaXBcZbGbYHjgiwFDIjNJY7+vc2btuDUM8eNvuIWCSWsBOfrKVbySFLP SlQ5tLOEsneJtlcpdGrAL7ofjDt+AE/cQFXHH14ZLW76nSA+279bNjyDFEbSaHzxIQjp K3Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=lmJwsmbg2fa79RUKnKTfYreM1E8A9rVsKKAtwPIzarQ=; b=UAfMR5gx1Cx2A5w6YKXACotBVZQuKBXJ0zwleuPWz6fRO3EzxBS5JQmJoReD1z0YrF KovLvaQOtqrZ2JEPnqWYtatT18s/bc7j2UYs/1+7o71zooQoMS2dPUS5JBAjaiSfPcuM Qv0GrKLYuMyKec7wYhpLu5Io0tKsdDxjq/kTmXXUV4LywfCtc3h3kazCmX5hTowsMjnI anlaYgY4EBUr6dw/dFhTQvo1Q5ZRAiIX1NejC6V17deI0CIk2/5o7mJnWmyPnIBorTmN arqGsfd5M4J2Wkxy6oEGoyO1j/3ruKLCMsMLLMFXFqThqtgbuA1MdNvkz5owdGIS3nDO tpSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=0JFHPycF; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si17420657pgq.325.2019.04.24.12.41.23; Wed, 24 Apr 2019 12:41:46 -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=@st.com header.s=STMicroelectronics header.b=0JFHPycF; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730065AbfDXMjH (ORCPT + 99 others); Wed, 24 Apr 2019 08:39:07 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:40048 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbfDXMjH (ORCPT ); Wed, 24 Apr 2019 08:39:07 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3OCaqCa030305; Wed, 24 Apr 2019 14:38:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=lmJwsmbg2fa79RUKnKTfYreM1E8A9rVsKKAtwPIzarQ=; b=0JFHPycFxZn8e5V7DZ3v4KZtihHO6tAhPZUU5XVrK6v996KlG4GHnaUn98mbaG5kucaf cqYldf02FdGx3oToweAU+WgrOuf4sdjh8eg4V+IOC5V+mhIYZYToEe4ErNY/AhbyvqDM qBUXEjAz/BycXX4AqTCs8W1xhinsUH/gi9jr9cLq9pSS2Mt/HKl5KDgitKb1O/NBhHXP WWc6wGy4H/bLu8yAinK4RWAYbR5Cpxf2N7ZMxdySjvMM8mtMdfw+pW2Vjeo1Dnq9MGWJ l8AqvE9HValCmurydZX0PuajHWHGP0p39t5uQQvCCvHUVdH5EwOo9vPl4eGiYoBCZz1k jQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2ryrvxdgga-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Apr 2019 14:38:56 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4747D31; Wed, 24 Apr 2019 12:38:56 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 27F13258B; Wed, 24 Apr 2019 12:38:56 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 24 Apr 2019 14:38:55 +0200 Received: from localhost (10.201.23.25) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 24 Apr 2019 14:38:55 +0200 From: Fabien Dessenne To: Mark Brown , Maxime Coquelin , Alexandre Torgue , Amelie Delaunay , , , , CC: Fabien Dessenne Subject: [PATCH] spi: stm32: return the get_irq error Date: Wed, 24 Apr 2019 14:38:44 +0200 Message-ID: <1556109524-21874-1-git-send-email-fabien.dessenne@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.23.25] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-24_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During probe, return the "get_irq" error value instead of -ENOENT. This allows the driver to be defer probed if needed. Signed-off-by: Fabien Dessenne --- drivers/spi/spi-stm32.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index 4186ed2..b222ce8 100644 --- a/drivers/spi/spi-stm32.c +++ b/drivers/spi/spi-stm32.c @@ -1839,8 +1839,9 @@ static int stm32_spi_probe(struct platform_device *pdev) spi->irq = platform_get_irq(pdev, 0); if (spi->irq <= 0) { - dev_err(&pdev->dev, "no irq: %d\n", spi->irq); - ret = -ENOENT; + ret = spi->irq; + if (ret != -EPROBE_DEFER) + dev_err(&pdev->dev, "failed to get irq: %d\n", ret); goto err_master_put; } ret = devm_request_threaded_irq(&pdev->dev, spi->irq, -- 2.7.4