Message ID | 20240114152759.1040563-4-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-25503-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp1248844dyc; Sun, 14 Jan 2024 07:29:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+MN6ZtAWRIHu7OLJNgiMvQoQt+xEUNHSc2az2KMQJFKT9WaRgiOOsVMfvsXW4mjkKyVKg X-Received: by 2002:a05:6a20:da82:b0:199:7f37:5200 with SMTP id iy2-20020a056a20da8200b001997f375200mr5540987pzb.106.1705246164818; Sun, 14 Jan 2024 07:29:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705246164; cv=none; d=google.com; s=arc-20160816; b=VhWUTit8dK5L95s2AEFlujwUCj99yAxSiZJWVEgYvhq9ufNU4AHBAUgQf2GUYFrq9M WV0AVtddWc5TaGTrGm/XKsNXXAIUcUp8dqD8UvcCiv7gNQxh4OBjrZeuDIvOW29kB/zm W3Po5O2mvPAomatO9WHFaQBRyNt68o6EEKNnlJdNJ6pBgvDiGEYPyl26cqibXWNKjnkC dheGH856ttXsg6Pq2E9Kc6ZYK19N0sza8MwkCSKo4Z/FutjO03dSLpQymbEpdEoeo6+X jR3gL+ITx1DFD4zfE19+DUMD5WP9oIVPTWFbJL/tCzTeCHh7KEa1qnNy7cwa1cuTJsMN 3oxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=65daLCwb9hLwIZ9BhWTHUYmytgTMz/E1KSfwy5A1ogg=; fh=mgFXmQvNwPRRqTo0F2bG2XoRFpGxhFpM0UrwgLf/FtA=; b=QX2put/vjEONmTY8WqaW9SkLBjBYp9mQaZYwPcbYfJ4Zx0OBR9cPe/puGRI5FfdRqp Cjpiv5WiQw3JptU77xN9SNcppuFATRf0bbLAFxeBjGlT/X+Bty2ZoQ/ik95sKq93jEvh uxtjLPOWC8KJYBLqdWq+ECK63Cx63e+UT9nCQAzlFV1EuMO2As4hTbfNZX5aGl1RnK7i 13T8MT/Iw8yVYOEoD9sU8O+fEOAFSJA77acal2ChhQBjHYiaphhPHzQiOz2UjGv4j7R+ EcycUm+HQaxdeck4LzUXd+WbL4uRBjPtHzAgqVMxyAZI54Lpe6Ry6IPd2v1Wd9CHWoQC 6zog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gixEha1f; spf=pass (google.com: domain of linux-kernel+bounces-25503-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25503-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n5-20020a634005000000b005cdfc019324si7277799pga.629.2024.01.14.07.29.24 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 07:29:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25503-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gixEha1f; spf=pass (google.com: domain of linux-kernel+bounces-25503-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25503-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8154B2822F8 for <ouuuleilei@gmail.com>; Sun, 14 Jan 2024 15:29:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D11AE13AE9; Sun, 14 Jan 2024 15:28:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gixEha1f" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B78433D65; Sun, 14 Jan 2024 15:28:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705246087; x=1736782087; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KtcwDtLKAtATSufVVVCnn6c5MCnYP7WhV++Dk6UXa9k=; b=gixEha1f9cr4TByba64mmJewzG5z+e+4cYiXZhbaW+QIoSFmjduCgzob qnftY0v7QYFfqJwyt1knS+mjJ6+C1Un7awmgieKkiYWbtOLKGoaSWOauU 2x3vmo6yakdqwJOZtmjPT4pFPF8fybCmFu/jskDghqXYf09LEcj/I/PH9 pRBqfXgxNLalqG++LNiKDC98T/vdt+ZxFervB/JM4hVibLGfU1NY551hx amMGKaVxLpK6igaa6CZkY2IgOZutjcCYYF4/uwxhJ7Hb3fAvFVWx+ioPv IqeVmW8VRgYlSVhuwRk7TESF3HuEoZ5sr0Ud7gZYmgLYFwMxmjjD67aFt w==; X-IronPort-AV: E=McAfee;i="6600,9927,10953"; a="12835866" X-IronPort-AV: E=Sophos;i="6.04,194,1695711600"; d="scan'208";a="12835866" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2024 07:28:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10953"; a="1030429355" X-IronPort-AV: E=Sophos;i="6.04,194,1695711600"; d="scan'208";a="1030429355" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 14 Jan 2024 07:28:03 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 47AC83EA; Sun, 14 Jan 2024 17:28:02 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lee Jones <lee@kernel.org>, Daniel Thompson <daniel.thompson@linaro.org>, Jingoo Han <jingoohan1@gmail.com>, Helge Deller <deller@gmx.de> Subject: [PATCH v1 3/4] backlight: hx8357: Make use of dev_err_probe() Date: Sun, 14 Jan 2024 17:25:10 +0200 Message-ID: <20240114152759.1040563-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240114152759.1040563-1-andriy.shevchenko@linux.intel.com> References: <20240114152759.1040563-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788080202227945900 X-GMAIL-MSGID: 1788080202227945900 |
Series |
backlight: hx8357: Clean up and make OF-independent
|
|
Commit Message
Andy Shevchenko
Jan. 14, 2024, 3:25 p.m. UTC
Simplify the error handling in probe function by switching from
dev_err() to dev_err_probe().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/video/backlight/hx8357.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
Comments
Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes: > Simplify the error handling in probe function by switching from > dev_err() to dev_err_probe(). > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
On Sun, Jan 14, 2024 at 05:25:10PM +0200, Andy Shevchenko wrote: > Simplify the error handling in probe function by switching from > dev_err() to dev_err_probe(). > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Daniel.
diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c index 8709d9141cfb..fbe02fd73272 100644 --- a/drivers/video/backlight/hx8357.c +++ b/drivers/video/backlight/hx8357.c @@ -579,10 +579,8 @@ static int hx8357_probe(struct spi_device *spi) return -ENOMEM; ret = spi_setup(spi); - if (ret < 0) { - dev_err(&spi->dev, "SPI setup failed.\n"); - return ret; - } + if (ret < 0) + return dev_err_probe(dev, ret, "SPI setup failed.\n"); lcd->spi = spi; @@ -617,10 +615,8 @@ static int hx8357_probe(struct spi_device *spi) hx8357_lcd_reset(lcdev); ret = init(lcdev); - if (ret) { - dev_err(&spi->dev, "Couldn't initialize panel\n"); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "Couldn't initialize panel\n"); dev_info(&spi->dev, "Panel probed\n");