Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2223469pxb; Fri, 17 Sep 2021 05:15:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWIHEPVUXOUIv0aPBevrDc/88e35YQINj8Xw068IdgxREJONfvfZg+08FkPJ+fJNRZo1e6 X-Received: by 2002:a92:d2d1:: with SMTP id w17mr7777925ilg.145.1631880925680; Fri, 17 Sep 2021 05:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631880925; cv=none; d=google.com; s=arc-20160816; b=dsxMFmADEhkwUa8Y1Hl64nDMVhegRACps+b2YdiyhLmQPnsQAU9uI1aXE0fcx6cdly vB1mQ/6sgCHmuhC/ho84MlWm6S9sMTpnuD9jg3VJzUE/tuQsN1SpEBAvAjbzEr5DV2NC kDmAy8rpNH5fZ9d3h5SefT5mv3lB35iXdtzuaBEzD/f+M9HT26guy6gIiYiN6OEY4a8r DMT2VEmyVI9OU14E7zCpLfLIzOLkf03bbEK1bKd6oraHRJTQ4etwMmZPDaJY/OF1XkRd E9R1+lnUQJktLYx1NBAxFZvSuBj79h9Gn7DKSXVpIzSlFHb1gKVEyT+9GO3Mr4UylRLk Nr8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=GjMELSMwHrDRYRZYd1+fGCttZlv1rJlI+BT2B6Zf22E=; b=rE9mcg/6p1VwyO8d5bIgQDBEatu2CFF/Y8l9Pz3RLl8oxcTExsjSV9A6KTZuKWgVVZ 2nlRXXidkBmWW/GBcnhwsf5iu5YQQhpi/hiXtQ9ROoYVLq+Oh8wJEFLB7E1nsP+cbbI/ +RpEGY4crU3iHqUYhAuqoWI578rcaeGOD97ckURJaL/BzkmydhcM6QODZaRKCCwyaGQ0 fsgHecQthRULlc1XGiAt9ykXk+i45ac8oyZ8vFnejXcG4P6d4AQQROwgHOIDCo8ggg6/ IxtZqj6qUqpPa+BmSJJSRF0mL9UrYVdVQujiZ1+l4AMHHLRvMBrjNyKTvbTpCKk/mTpK 8SBg== 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 y7si6094354jap.59.2021.09.17.05.15.14; Fri, 17 Sep 2021 05:15:25 -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 S244484AbhIQEYH (ORCPT + 99 others); Fri, 17 Sep 2021 00:24:07 -0400 Received: from mx24.baidu.com ([111.206.215.185]:52748 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242139AbhIQEXt (ORCPT ); Fri, 17 Sep 2021 00:23:49 -0400 Received: from BC-Mail-Ex03.internal.baidu.com (unknown [172.31.51.43]) by Forcepoint Email with ESMTPS id EF4F84E4D0413A9999FC; Fri, 17 Sep 2021 12:22:23 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex03.internal.baidu.com (172.31.51.43) 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:23 +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:23 +0800 From: Cai Huoqing To: CC: Jingoo Han , , , Subject: [PATCH 2/6] fbdev: pxa168fb: Make use of the helper function dev_err_probe() Date: Fri, 17 Sep 2021 12:22:08 +0800 Message-ID: <20210917042213.17689-2-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210917042213.17689-1-caihuoqing@baidu.com> References: <20210917042213.17689-1-caihuoqing@baidu.com> 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/pxa168fb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c index 47e6a1d0d229..35cf806a9219 100644 --- a/drivers/video/fbdev/pxa168fb.c +++ b/drivers/video/fbdev/pxa168fb.c @@ -606,10 +606,9 @@ static int pxa168fb_probe(struct platform_device *pdev) } clk = devm_clk_get(&pdev->dev, "LCDCLK"); - if (IS_ERR(clk)) { - dev_err(&pdev->dev, "unable to get LCDCLK"); - return PTR_ERR(clk); - } + if (IS_ERR(clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(clk), + "unable to get LCDCLK"); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res == NULL) { -- 2.25.1