From patchwork Wed Apr 24 14:03:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien DESSENNE X-Patchwork-Id: 10914885 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC7401515 for ; Wed, 24 Apr 2019 14:04:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB6B028A26 for ; Wed, 24 Apr 2019 14:04:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEAD828A5D; Wed, 24 Apr 2019 14:04:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7E95828A26 for ; Wed, 24 Apr 2019 14:04:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JKSbW/PTPUiQuB6oglt1rnJtGGX23VVv64ZQeyw0gIA=; b=FPaJFOtl3UgKGn RzghjWZio+U+EB1lqOI4SJwpDVjI/INSVf38E94caknifNQCjwaiXhlwD1wWRLYhXAOwnlp1mIIaz dpLgJUBbmf/Y/R+SYk9MI1APf25+4HDnaSBf5f0UuiR/xeDwl+hg2IhEnATFvvv37IetA4vAIzmyq AEmNvXZ9LeTuKb6vPnpWF7ag5u/tPK8AOUJkxrWXvIqqgsqKLdoT+KXjgu+Icq2W8w1RQOG6nPX5I zheT+IehfFpe0vaNcqov22pAqSIUld54TwltsuOxap+kezd5u46JQAwo7RHky7OXXx3u7ZCLn8MZw bSj2FrfHSnTc3u+w7hhQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJIVM-0003Z6-Tb; Wed, 24 Apr 2019 14:04:08 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJIV5-0003Gt-Vq for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2019 14:03:56 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3OE30lm030064; Wed, 24 Apr 2019 16:03:41 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=VPpkj27FkT2JUmw5i0uH5uPvA33C/SMpLxZt5wiIQkg=; b=llnf21raHPAq3DyDEMy1zurdauq92Ht7y7MTdhLO/yNV4wIfgx8Jcffc2S8oESnwzYi6 oO6fBaHYyh/H6tFK65Urcy5+zrl3vg4kxXwcIR8jUCmzEExRmw6pzK01Dcuk7cHDiyGd TFtw6w4IBcAYm+3i5dxOJVkfWrdk70LwQ3SK9MBuLE2dl2VHKbji/FCos+pllx+7oIqs pSnjjxW6SlB6xGQF0GBD/oE6jikMJbtVBnd1zVsSf2I8Znrm6e1fWij8G9O+QirEoq8k SbGv46x4iORFV+UVF8vVwepkSf9tyb9tgDILHRGj8z5Sqv1PkhFXgdc0YSBJVBcyC7W6 4Q== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2ryrj67cbs-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Apr 2019 16:03:41 +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 B59AA34; Wed, 24 Apr 2019 14:03:31 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9B44C2730; Wed, 24 Apr 2019 14:03:31 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 24 Apr 2019 16:03:31 +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 16:03:31 +0200 From: Fabien Dessenne To: Yannick Fertre , Philippe Cornu , Benjamin Gaignard , Vincent Abriou , David Airlie , Daniel Vetter , Maxime Coquelin , Alexandre Torgue , , , , Subject: [PATCH 2/2] drm/stm: ltdc: return appropriate error code during probe Date: Wed, 24 Apr 2019 16:03:21 +0200 Message-ID: <1556114601-30936-3-git-send-email-fabien.dessenne@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556114601-30936-1-git-send-email-fabien.dessenne@st.com> References: <1556114601-30936-1-git-send-email-fabien.dessenne@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.25] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-24_09:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190424_070352_345965_295F8072 X-CRM114-Status: GOOD ( 13.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabien Dessenne Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP During probe, return the "clk_get" error value instead of -ENODEV. Signed-off-by: Fabien Dessenne Acked-by: Philippe Cornu --- drivers/gpu/drm/stm/ltdc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 521ba83..97912e2 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -1145,8 +1145,9 @@ int ltdc_load(struct drm_device *ddev) ldev->pixel_clk = devm_clk_get(dev, "lcd"); if (IS_ERR(ldev->pixel_clk)) { - DRM_ERROR("Unable to get lcd clock\n"); - return -ENODEV; + if (PTR_ERR(ldev->pixel_clk) != -EPROBE_DEFER) + DRM_ERROR("Unable to get lcd clock\n"); + return PTR_ERR(ldev->pixel_clk); } if (clk_prepare_enable(ldev->pixel_clk)) {