From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E040CC4743C for ; Wed, 23 Jun 2021 08:48:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4BC7610C7 for ; Wed, 23 Jun 2021 08:48:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230109AbhFWIuf (ORCPT ); Wed, 23 Jun 2021 04:50:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbhFWIu3 (ORCPT ); Wed, 23 Jun 2021 04:50:29 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F8CCC061574 for ; Wed, 23 Jun 2021 01:48:06 -0700 (PDT) Received: from [192.168.0.20] (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5470E9B1; Wed, 23 Jun 2021 10:48:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624438083; bh=3ujV73LdLnsx9p7SHxJnBMRq2/9SyhANtzEe43qLPfg=; h=From:Subject:To:Cc:References:Date:In-Reply-To:From; b=dvLNMm4EYAm/OuVc90+e1f//g5qL0rR1wwo6c1zStmX1aRRELzz4H4TzzMcYyGfxO NYW/ubKU4cdnBV51UanycjzJbDvgPguyFl+2jBMNPP14AokAyTj+mqmdNatEHLKhLw ppP60T9MS4nG0Y9P4j55Jkt1HjHFw7LzjMU4cwDI= From: Kieran Bingham Subject: Re: [PATCH] drm: rcar-du: lvds: use dev_err_probe() To: Laurent Pinchart , dri-devel@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org References: <20210623030646.7720-1-laurent.pinchart+renesas@ideasonboard.com> Message-ID: <9a71feae-b4e5-f512-c5ed-b1155914940f@ideasonboard.com> Date: Wed, 23 Jun 2021 09:48:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210623030646.7720-1-laurent.pinchart+renesas@ideasonboard.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Hi Laurent, On 23/06/2021 04:06, Laurent Pinchart wrote: > Simplify error handling by using the dev_err_probe() function. > > Signed-off-by: Laurent Pinchart > --- > drivers/gpu/drm/rcar-du/rcar_lvds.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c > index 5909173b26eb..165be31c4c45 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c > +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c > @@ -839,9 +839,8 @@ static struct clk *rcar_lvds_get_clock(struct rcar_lvds *lvds, const char *name, > if (PTR_ERR(clk) == -ENOENT && optional) > return NULL; > > - if (PTR_ERR(clk) != -EPROBE_DEFER) > - dev_err(lvds->dev, "failed to get %s clock\n", > - name ? name : "module"); > + dev_err_probe(lvds->dev, PTR_ERR(clk), "failed to get %s clock\n", > + name ? name : "module"); Reviewed-by: Kieran Bingham > > return clk; > } >