Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2222937pxb; Fri, 17 Sep 2021 05:14:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOQ1AvAiiZK2jJpVv6OwQY62G/N1AfsJ0iT66ztz4FbbOl+t6imCZH9F+2OCn9oSSuN2dy X-Received: by 2002:a5e:d711:: with SMTP id v17mr768643iom.93.1631880882426; Fri, 17 Sep 2021 05:14:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631880882; cv=none; d=google.com; s=arc-20160816; b=rYyC7BTdjxr1od2b32tdtSUGKYnP6G+yDkGb1MYQsXl9tYUG8o3XB13bHgc7N6FqX3 Qs36NTEBiGpEeIiHIhkRPYqu0DG+0WJtwSa6Ag6Q/STwneIHOJW9voKTCbyTyMLh4uJA fkGL7qI1Op7SRmFs7SrgbKDAh1FvqpmUGc4ohh9XU2gNk0VcNv1oT5xqISENPqrmGgNK t9B3uXBVQT/w56ZFE3hdEzn5BtkxNZYuhbORUmSicWRKQUp2OlP/G98lzH9jn6X4XFv2 WsQR+Adm/CiP06CIomSmIoYJBsaTOXwd5S8BPJ7e1uPnzf6Yhn8LLDx5o38otQ+05GPl NNfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=TLv8YLGIxM00QLgO48wdcpUqWMRohLTacMD5i9cLVi4=; b=lVj8UdT2SRSJUeSSJyBVnAcEYcoxg95H4dNrclXzKBlmkooRiNUofgjYAAuE+jkV6q V24JGA9oirYaaoJ9G0jtZ9Nmom94g4ld1LlrTo+tQuG946c0zTvYxSPs3DkixDS6C5mP Di8FAwt+34ztHiOgbyBOiI6SOQ6GNEIkhzsGEXXRkBRcETCwU1aPSuMKYPeB1jXocmHk szL/ibNXnVEpCVNNFCEcwVmS8rTWM4I1C1rVC7Ol3xbnhPpu55j4EMwcwcSBSfmo6m48 wHj8fao70AJBgMH8fswlH70r7B438ROFRBwMVDdGej/ndU8LBfvdGt8fu0u/YtX/OUax TEHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v8si1364409ilj.145.2021.09.17.05.14.30; Fri, 17 Sep 2021 05:14:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244368AbhIQEXt (ORCPT + 99 others); Fri, 17 Sep 2021 00:23:49 -0400 Received: from mx22.baidu.com ([220.181.50.185]:52714 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231128AbhIQEXq (ORCPT ); Fri, 17 Sep 2021 00:23:46 -0400 Received: from BC-Mail-Ex07.internal.baidu.com (unknown [172.31.51.47]) by Forcepoint Email with ESMTPS id 6889FF61B7E1156E264E; Fri, 17 Sep 2021 12:22:21 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX07.internal.baidu.com (172.31.51.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Fri, 17 Sep 2021 12:22:21 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Fri, 17 Sep 2021 12:22:20 +0800 From: Cai Huoqing To: CC: Jingoo Han , , , Subject: [PATCH 1/6] fbdev: da8xx-fb: Make use of the helper function dev_err_probe() Date: Fri, 17 Sep 2021 12:22:07 +0800 Message-ID: <20210917042213.17689-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex05.internal.baidu.com (10.127.64.15) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing --- drivers/video/fbdev/da8xx-fb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c index 005ac3c17aa1..ae76a2111c77 100644 --- a/drivers/video/fbdev/da8xx-fb.c +++ b/drivers/video/fbdev/da8xx-fb.c @@ -1354,10 +1354,9 @@ static int fb_probe(struct platform_device *device) return PTR_ERR(da8xx_fb_reg_base); tmp_lcdc_clk = devm_clk_get(&device->dev, "fck"); - if (IS_ERR(tmp_lcdc_clk)) { - dev_err(&device->dev, "Can not get device clock\n"); - return PTR_ERR(tmp_lcdc_clk); - } + if (IS_ERR(tmp_lcdc_clk)) + return dev_err_probe(&device->dev, PTR_ERR(tmp_lcdc_clk), + "Can not get device clock\n"); pm_runtime_enable(&device->dev); pm_runtime_get_sync(&device->dev); -- 2.25.1