From patchwork Tue Mar 5 08:11:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 778126 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B93F7EF18 for ; Tue, 5 Mar 2024 08:12:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626339; cv=none; b=MoM0mjGFr/2thvIwYRJJLyAZrjw3q6yhbWwOdHzZM130U9+uC5PWSyDDYVXwbcP9aCWR7TvUehp7hX8B44u2Lla7VXaMJTldUTO37I/3zFGavevXzynoWGKO0Zu3tp4d3Xf1q0t+PosIdHCBoXfFiYHW4/nPXkj7RDyYTgIVG5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626339; c=relaxed/simple; bh=opt8++1g0VChwtIB/Fz1GiYx24pMTFMe80pujvPzm0s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HQNmeaBKqF+QbvqFvPdjISbP7z09EjD+kHlZ7vW8ZhCWVhkXN2G9RcQXx2reQ14hj+QcNbL+DzMM5gNQwu8nH0r034cW7xQzmTXADM4bNkzMKBqfCdNx1yD8v3g/SUpaqrw51ag3ZxpKsxAZPBBhQKIhkXVDPv/0u5uLDT1+PjQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=mMSoDi4B; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mMSoDi4B" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-564647bcdbfso6150574a12.2 for ; Tue, 05 Mar 2024 00:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626335; x=1710231135; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=qZhcPKgdyjL8bhk28jJde1fP1o5dZ8nODM9Ogpw/oLw=; b=mMSoDi4B0ScoqRdIq65JbZqWxhBN2tGRGDPmnZFCLZcMnk1dGHvUpdXTKK23eQS1rz 14hBX01gsecwrSo9qQY34bm5BEPuGzI+7yAF6/ZzsCpkJcQn4FuFXGIxGX/crNeULE9D wOpplKJ6hPI3swtCqMVb7Upxwyo340RSIoVKQHaEj01izNvgQ4vv6hQU+JsQjQR7yw4a Ep6Nr9IV6oxcZc0uYWIPJjmbtnnhtsi/CosKkJp5xzAOpLW2MlEmnCddwFzeEry0YvdI Gel5BHDTg/VyIY2rkqgfpdUm/QI5IIesm3X7NphtJN3wKSukxbsQ7ril6MDuRBpoxKys b4xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626335; x=1710231135; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qZhcPKgdyjL8bhk28jJde1fP1o5dZ8nODM9Ogpw/oLw=; b=pN+nG/DiSzyycfyfMalTxiTYqMLVVkQRcz8OCqGeUoTY1Ek+pLmuGPLts9XOf+LKc1 AirpRwj0m9Xfm8uq0AetRBVzN/vcUNkETPAV+pm3blr5o2CJzDHcyHoEvcC2Cx7F+2kB JH7XtZ0FPfkQUFx/5VgyvOyiPaozd/OLdCZmFFycrkhK44z+emP59Gtkm+rVCcen5aJq XqrnYLNDt2U/CxAkLMeW+GD0EfMBNI2TMAwbst1tjjy9qkLlonx0R8yOpvbfGAbjRIUi 7nW/P/mkbn3HyaeirY+HSC2Yk5MZJeZnX4Vw5wQYajjYP9N8/YJVH//U9MBBGBzHyYEN O7Gg== X-Forwarded-Encrypted: i=1; AJvYcCV37Z/0ZsjR5YwhEIvp4H5GSCK9AGhKvoeocMK79w2veVd3skRcDX4Qg75sBuqmUWfJcrAEoObiqB2yRAvz3US1NztPn0qoJwSJSLQ= X-Gm-Message-State: AOJu0YzogpS2bIto05NHFzxFWjqXMLDeyiFFN554Hdio8c+/WHPRo3BD +3u/QQkOixFAPSuXyz4s86u5IxL5sRdWskyvVGSmvfchMwbJzml/WtqkzXKE4R9/DMEzXopl8iS + X-Google-Smtp-Source: AGHT+IEuX6cKf625yCSFdJGJles12Fo1Zc/Eyc8YTMuYE42QgS4ym9vrzIj3xWMG/qe66D6f3pwLmg== X-Received: by 2002:a17:906:cc93:b0:a43:e46b:7a80 with SMTP id oq19-20020a170906cc9300b00a43e46b7a80mr7105432ejb.43.1709626335333; Tue, 05 Mar 2024 00:12:15 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:14 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:11:56 +0100 Subject: [PATCH v2 1/7] backlight: gpio: Simplify with dev_err_probe() Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-1-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1168; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=opt8++1g0VChwtIB/Fz1GiYx24pMTFMe80pujvPzm0s=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPWa6sw7b/TOSWZwZZYFLYG0BNvTG0TlbZoC 8bMfcQFWxqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT1gAKCRDBN2bmhouD 14vBD/9cqYKdrTAFMz6KcpOJxJ61CvuYnUPyihjwAG5ODNJ/TVWyi23DB4xZuL9d5a1Ff1xPt0K xenDTpvWcGV4PuNDjXe+sLUd0VWaBr/u/qSnQgDEhzYBbP095TSe7svObyzpsA6qK3c6YpxWv4J jRHXI5HShKxxPH2EqrqgzFx+xQOhmJAcBuWDyOCQDkJwGjvNShtjm/Bucp04ehxnXM2pmmdSTKV uH20IKKiZvxuOfnllFf117Iet3e0cK7KCMmcAy4CNi8N4Fyyo8+KcX1o2jwaYEJBzGqjSZJfHEc vRjVzwLQg2mBtty/lc4PwvvKabGqaIqiW9nDsqg7s8StjZZ2C1Xj6tWBgvGJiPJrOPscB0anvRo //2hXe/fq7N4168QtWlzL4qnPMBVMP7xjIFwwXCFasHOgBBuaYcWRYSmydbuT+8E+Ca5g7LWTSx Yt+0Nk5JLCTQ2cRZVdB7GYf93YoNlJ3mm2LS/bSDlBWQWuR5RMeuGTY680tY+ZGlCfbWp+mZxyX brBg1fFJMyxwb2hPg8YaH8BWgaqQHz2M/jMeap2g8W3xYqSJcrwk82QrnNzfw95/w0o5ejrpADE KKV05pkeESvkDdw0gNi+Jl++3PUHsLFtdS/Zt0LRqULopfstN3o6duCsIifq2E558izCkBczLjg m6Eh1t0XIs2hpyA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson --- drivers/video/backlight/gpio_backlight.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight/gpio_backlight.c index d28c30b2a35d..e0c8c2a3f5dc 100644 --- a/drivers/video/backlight/gpio_backlight.c +++ b/drivers/video/backlight/gpio_backlight.c @@ -64,13 +64,9 @@ static int gpio_backlight_probe(struct platform_device *pdev) def_value = device_property_read_bool(dev, "default-on"); gbl->gpiod = devm_gpiod_get(dev, NULL, GPIOD_ASIS); - if (IS_ERR(gbl->gpiod)) { - ret = PTR_ERR(gbl->gpiod); - if (ret != -EPROBE_DEFER) - dev_err(dev, - "Error: The gpios parameter is missing or invalid.\n"); - return ret; - } + if (IS_ERR(gbl->gpiod)) + return dev_err_probe(dev, PTR_ERR(gbl->gpiod), + "The gpios parameter is missing or invalid\n"); memset(&props, 0, sizeof(props)); props.type = BACKLIGHT_RAW; From patchwork Tue Mar 5 08:11:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 778673 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F060A7F483 for ; Tue, 5 Mar 2024 08:12:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626340; cv=none; b=LCZTrtK2Fmg+l8xhG5IAco769qdjgXKQjvvekVg38zR8AgfluW7yhSIlFl99S2Qq9jox7FL9x53GYNlsR2mpKfiUyvP87UO8YUdbKWCCdl1D1C2RBScuSSyf4GybX5D2taKx1XcXsp89O6d0BUHJxqtQ3Kum+hb7OvKqz0u4bac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626340; c=relaxed/simple; bh=V74J1dzwFo5ezSQUueHMb1/NFOrfZ3e7TgmXv0EuHDM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=X4qywKavoTVRFbpaDMZ4fUj7/MB/jVlVXHVD6WRqFi/ofk6FNOLhYoEu9YEwYHFaGxx0+uyHPHQAKnj5F3IJ03HcZe6Z8TclytgalGyFglrwf9BDL6QoeBRyQ+PWvYoTaIF6p8AM2G6YaQ9v+um/Iyq9icNSeLvWdH72JkxDV34= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=JszRfOl8; arc=none smtp.client-ip=209.85.208.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="JszRfOl8" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-566adfeced4so5583621a12.1 for ; Tue, 05 Mar 2024 00:12:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626337; x=1710231137; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=licg3hUE5I9iVSUhaQvUY/ICMniTjfaDb2iJSuUjn84=; b=JszRfOl8muCp7VQKPgIzMJOLmQjd1jZqB0KcgJVUBUI1gaQpxCIzDBf1XEuH6R0jc/ ngbu9MEQGph3g6BBGKhvbP9jXXIU0SasqrW/D5j3/dVuVjlCtcFDrtJnVq/oetLFGKeM qbHIcy5FTABOfnJfdhWc+wtTCIhSvY5fQArQRGpd5tfDpdqRSeRftw7/bws2qyimttzr Uw/71zfjBka5wbM0Jfpxz6+qawJAjx0HmLqT5OxIr0GOWZtl6fqFPTgw8V/220qVxS35 plSqUjTyyk4Vmpqlfzp/OOeJVMDW6nww9xcJtl2L2JM1nwqga5lk4S7D+0NvkzDe3yJo F5eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626337; x=1710231137; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=licg3hUE5I9iVSUhaQvUY/ICMniTjfaDb2iJSuUjn84=; b=eYh4IIHtz1TmRnIKq1xIMEA3z5ZcXFgHis/Zt/OsxIBA47c4FDawon+9Pfx+EKxptm VjFblxF0Iwbo/1lASeAnIQmyIzTftJAqe08+OlvMN0xSqigT6sM0cOYUrEA+rHm+HJvR Tr6WwpKf38yq4z9ZQapzV3DSGLtHLyruUW1Oj9gHvwcHfxXNSqkaldb2qPNvMcunMFmU LceyTjlBg76gp0w5+pGiVesrWykY1iU2+FzWLUevmRZCnEJaXqgIsIAskxJoahtB+2zV Mh9t1+QCipBhX6+HooGlnd39NPJgKx05CJJnngZ2nJFzH9wTVUg14amM76fP2JF+9uRx /ogQ== X-Forwarded-Encrypted: i=1; AJvYcCV0lnUm4R5xcSiecSX90R//bAurv8LcIeml1Vm8GMve5zskRcvJwnuWJI4ZsVrmzlAUKovYBWzaN68pCB/1epX45Vh/LsWnu43woOc= X-Gm-Message-State: AOJu0Yy1b5UArxuqDrcwFI/L8s5YxrpoXshApnehLPpqaptQ2ZjoKRHy /y8NgBEqSa1WJrk4h0SVo68lLWAP647CSC0Yq6E/WRC06GfTggquDighSKPQyeZ04hiDBgQ0PZN b X-Google-Smtp-Source: AGHT+IGfm7sGGkR9kUh8su5+o2QBu2BkEz27QYtpHoYuWXB8OY86QmE12Had2uOqdDw7VGaIixtjVw== X-Received: by 2002:a50:fa83:0:b0:566:51fa:3647 with SMTP id w3-20020a50fa83000000b0056651fa3647mr6968122edr.10.1709626336755; Tue, 05 Mar 2024 00:12:16 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:16 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:11:57 +0100 Subject: [PATCH v2 2/7] backlight: l4f00242t03: Simplify with dev_err_probe() Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-2-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2489; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=V74J1dzwFo5ezSQUueHMb1/NFOrfZ3e7TgmXv0EuHDM=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPXy6RPQ//PsVb4IYTUFFLKfQGgTqhNZjAe5 k8y1iiltayJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT1wAKCRDBN2bmhouD 1wKfEACbULmem8OvAeK+RHjlMayIwaUJM+uAeRNpZGPV6L4vyj8fGOfNFabiu5jtYwEOD8P1n5k sjmhuOectJ71wUf1KLkpU9jYUFDRIpF3IWplDn352HLVqkZevuejVUTS0D7zb2MHcs4HWf8ecI+ PRDIH87OTbGXXS6/CswU1Bnr83esrM05RJ94hfM5vkoom10EeTaCuD/GbCm0Qddi6VxMKnQF05U 5aUspkmJRq3JTIbZqpLsqcGJ4gZOBk10m+KXHEw66rRsimBz9hpnzyf3DC7dzmAxMZF9VUKY1xS fG25pvaOChS3UhIT3RjRcLUBElvel8TWrUIDXFIesd4bvewciUkRXPxlZm7iwzJv7rApgw93sNi fJPm2n0H5nbA+SXXlDfMgP3/QcVtfqkY6mtVyY/yU/j97vmq1tzodZVZZu0zDt9DWSfRXug6DZI OGULgir2GA6xgNGtufI4T115U3XlFPYpuzrLL9UawHvNJXlDcogHTMpjOZjvJHxHRa/9DdiVie2 goA++dpv0wqlnpInjDBFjh8MPlEqceV/nA/SkU4QAFi73i0HOQrDVdlUCrM+5cqHu/L+aeqCzX5 5ibcScLzNg7LET3QCv/K78ESsxWMz5U8T9vxWV8VAOaA8ILZkwLdjspJP344Bi4UQcBxiO//n1j GY2+W8LLtWpqZxw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/l4f00242t03.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c index cc763cf15f53..bd5137ee203b 100644 --- a/drivers/video/backlight/l4f00242t03.c +++ b/drivers/video/backlight/l4f00242t03.c @@ -179,34 +179,28 @@ static int l4f00242t03_probe(struct spi_device *spi) priv->spi = spi; priv->reset = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(priv->reset)) { - dev_err(&spi->dev, - "Unable to get the lcd l4f00242t03 reset gpio.\n"); - return PTR_ERR(priv->reset); - } + if (IS_ERR(priv->reset)) + return dev_err_probe(&spi->dev, PTR_ERR(priv->reset), + "Unable to get the lcd l4f00242t03 reset gpio.\n"); gpiod_set_consumer_name(priv->reset, "lcd l4f00242t03 reset"); priv->enable = devm_gpiod_get(&spi->dev, "enable", GPIOD_OUT_LOW); - if (IS_ERR(priv->enable)) { - dev_err(&spi->dev, - "Unable to get the lcd l4f00242t03 data en gpio.\n"); - return PTR_ERR(priv->enable); - } + if (IS_ERR(priv->enable)) + return dev_err_probe(&spi->dev, PTR_ERR(priv->enable), + "Unable to get the lcd l4f00242t03 data en gpio.\n"); gpiod_set_consumer_name(priv->enable, "lcd l4f00242t03 data enable"); priv->io_reg = devm_regulator_get(&spi->dev, "vdd"); - if (IS_ERR(priv->io_reg)) { - dev_err(&spi->dev, "%s: Unable to get the IO regulator\n", - __func__); - return PTR_ERR(priv->io_reg); - } + if (IS_ERR(priv->io_reg)) + return dev_err_probe(&spi->dev, PTR_ERR(priv->io_reg), + "%s: Unable to get the IO regulator\n", + __func__); priv->core_reg = devm_regulator_get(&spi->dev, "vcore"); - if (IS_ERR(priv->core_reg)) { - dev_err(&spi->dev, "%s: Unable to get the core regulator\n", - __func__); - return PTR_ERR(priv->core_reg); - } + if (IS_ERR(priv->core_reg)) + return dev_err_probe(&spi->dev, PTR_ERR(priv->core_reg), + "%s: Unable to get the core regulator\n", + __func__); priv->ld = devm_lcd_device_register(&spi->dev, "l4f00242t03", &spi->dev, priv, &l4f_ops); From patchwork Tue Mar 5 08:11:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 778125 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CC6C7F7D6 for ; Tue, 5 Mar 2024 08:12:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626341; cv=none; b=j6z43t+o40qpzqKYqiJgC2mroPsOb7Js+eR/OpCbBDCjDZ4H1nUbfJDjwfXP1ky7yxNLI+r9/XuODBY9h5ymRzNpPPGDlAg1mMjNc/5mvKz9yaey7DQOhHWpkne+ybMy62KlQI9Xq856aGj7wwF4W8CeQi7bQKwnoMpB4o6GyDQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626341; c=relaxed/simple; bh=utYDuw34nGuToY7y1IT+NIEhf3NsXvVlpcJR4JW2mxc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YB3MX+QcjmXaEgNDWcMDqNZMV7zyPm/rWksgYQ1J1Qfkb3hHKi69YQoxpKKLmSJ1aYCNNl8zGC3A0ZN7K+R+q+VWrKlq0AEbDQ4eV0m4Q7XlHf/uGClqYigzUvBx9jgrK68pWAhlOKt57egj8OGxD2y9rUXfNi4Yvs6x8jxvJz4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=xaOdjqdK; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xaOdjqdK" Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-55a5e7fa471so7375603a12.1 for ; Tue, 05 Mar 2024 00:12:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626338; x=1710231138; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SGEzMDVs2SuhSNZcHsDkwLnjMMEuR/jN0H7FBJN5bdE=; b=xaOdjqdKeSrEDN5EsXI1rOFIuFmaVVGeb8MFUy3rcMTOTyplJ/ijHe5Bc00gnDrrcb PSixhRLrJjvKGOVnD8KKI5V26V9l+afRUZ3RCYREe1a3kHRw0I8htCOyAxwHdY81ri5J fTBDp5X8q00Tn3N6aE9kSHifuSxLJbZ2zq8JKAcYrxNcwCjQMjtP9/PH6KBL9Y1gMGh2 /oUL7NS1QTUdvpIi2AtrlhrgUn4v2JukZl84O5D91fiRkgrZ/cgD+8jpi2/T6w72EmrF hycW8Awu2BIA7zeS+tJnUEHdugc3JDLRI4BCQfEKJFJfBG0ujoT0McYQvE9HXV6e3oFg 7LxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626338; x=1710231138; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SGEzMDVs2SuhSNZcHsDkwLnjMMEuR/jN0H7FBJN5bdE=; b=cg2lJMRcpYaDG6P/kK0y2sVJO8pMV1PTrW/4eZqhh40lQftEz3iz7+dQrf8OrS0vWE 6eYxM7uNuQ8igjHc8ff6+K8QuhaBs05jJlIgB2wm6xP/o48dgYLMwHobzZDD6TEVUDFx rQ6dVBcfKKSwwuJj2vD9KcNo1/bhvSYvKste9WJfIYKGIVElwWwQfk9PUaB0GQB+JrpE XwKdDQ0a17i9aL06wJqscQh46A8SRzB0SZoexfw1r8wNGXHuD7bfsEJuY6BFl/e10VCh e0PxRFF7/l4wh0HrdZpHeXrBenNLRgR6+Gsy4JnnYOkfFuYKeYUeTWLBzzj+YdMqyzLZ 3jTg== X-Forwarded-Encrypted: i=1; AJvYcCX6zlKgxgvcT7zFOpxVnDQlUUxA4UAYHLahcLnElNlRZLLGtKrzmHoOUILpZENOVpe0UwAO4ctltptIHmz0IcBEO9PizoiDGJpixy0= X-Gm-Message-State: AOJu0YwkQCa6nBEURpzVLRBNd31kl+Ht95wyzmajFDNGEmngkeF1ykOs DorjGdTGxpveXTiipYq/cpsvDy8IEPUSM2UGmeuhW3AhM5HY6eL+1KiBF0GVZuAHvSP0S3QFTRC t X-Google-Smtp-Source: AGHT+IGPoDsTMtd30w/DOshzWoUEHpx/Q/pa5sDpp/arpdkYcoyWSkhqspl63v7mKF9KA18tbb+Y6g== X-Received: by 2002:a50:c88c:0:b0:566:44ca:9f5c with SMTP id d12-20020a50c88c000000b0056644ca9f5cmr6893675edh.8.1709626338138; Tue, 05 Mar 2024 00:12:18 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:17 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:11:58 +0100 Subject: [PATCH v2 3/7] backlight: bd6107: Handle deferred probe Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-3-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1306; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=utYDuw34nGuToY7y1IT+NIEhf3NsXvVlpcJR4JW2mxc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPX0BTP6R7BZf+T2A19wNFHqlTtCuGUa2M9E W+LsqYM6eyJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT1wAKCRDBN2bmhouD 17l9D/9V3Rtsc9kSl3ihhdhQ3TA7WjcTHaWmAnmked6/2v/yRSimxEfAaz+db9sq1EZ23XaHlA6 ICFtKCF/SvSGy80HnJvGKX1Th7Eem6h1onaS0Zip0WVVyrRzkoIKYfLbHRge29FExq6ycEcDF7O 5bu0FL7MaiwjmEbP7Kyb57n+Vp0V/FUbVMJz4dk4QrVSkZyJfUa9PGjURWJN7QZxVgFp2ntwxNT tcnLYB6kr4o9/xezchi5rX1z+tRx5cHZZyr2KTDqRL50k6xeE6lL3WYyfQNyNaObvGZeuAn9rbA TOqHm44+n4QD1zGM2jG+9qTb3MCttYy3J3ix6WXhUl2VOzA3IUYARp7Gy09+r3EH2JDwWAHWkf6 OrNM3MxYy9jAmkXNxPkcOoHxm0Mynoz5IQlX9kwcwruj1Eu7Y+rSgjrd9hg+fgc2CuNsb/VPkR5 Pb2gsGKYCLQSj3akNr6JTu7T9ch2H+scaP40a169Nc5mjwqXNWTqx5vw17OjuUy3+xYkFmS1QFc tnLVTBhUXjpum518RA9w30D1JkVK5K82wlOAKZdiwgZ16oREN6NXUIOMZwXW9zsQu4X+ZL8SqXP IOa1VEKXQ+H9MIVu0sgGul2COHGnhRJgbOc1dJZrgbXQ7WS6XOhzflJhcl/ct4yrxqnepmw2Dxh MgoyRlqN12K8NdQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Don't pollute dmesg on deferred probe and simplify the code with dev_err_probe(). Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/bd6107.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/backlight/bd6107.c b/drivers/video/backlight/bd6107.c index c95a12bf0ce2..b1e7126380ef 100644 --- a/drivers/video/backlight/bd6107.c +++ b/drivers/video/backlight/bd6107.c @@ -119,7 +119,6 @@ static int bd6107_probe(struct i2c_client *client) struct backlight_device *backlight; struct backlight_properties props; struct bd6107 *bd; - int ret; if (pdata == NULL) { dev_err(&client->dev, "No platform data\n"); @@ -147,11 +146,9 @@ static int bd6107_probe(struct i2c_client *client) * the reset. */ bd->reset = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(bd->reset)) { - dev_err(&client->dev, "unable to request reset GPIO\n"); - ret = PTR_ERR(bd->reset); - return ret; - } + if (IS_ERR(bd->reset)) + return dev_err_probe(&client->dev, PTR_ERR(bd->reset), + "unable to request reset GPIO\n"); memset(&props, 0, sizeof(props)); props.type = BACKLIGHT_RAW; From patchwork Tue Mar 5 08:11:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 778672 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 852B97FBAC for ; Tue, 5 Mar 2024 08:12:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626343; cv=none; b=HyfHdfWExEdfzHtm3PAbcLv+3a8Ls9/DMIRK80F8jPvTyUNc9ufXxVAYF09RFkygE8sfodb/XVduAiiAbx9OOtiVpeZVXWLHPHDz0kbOtvU12WCfjAoofe4V+CfXHqYKj1tOcZpuY4Wi0/ZdnbLh+XovXm1SiK3qdGb70CZFqM0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626343; c=relaxed/simple; bh=rLcNWyHrJ59PgQVMQdROdn158veQsUOWpOpARELHPHY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=t0AovpfS8yyraEdV/bOpXc2xdIBDcO6noe8a1vxiET7dfozRFEVo1sP57VMWvQUtdAer0bGAms8hPZhk4c71doTAEQOiSZvjG+BCF4TDzDVLMfuWSw6eJ0O2hOprjFu6zWz9vfFIvrxvMox4vGH5N1KyRQd4IX17S5ZOvNo2fBg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=QvAtfn06; arc=none smtp.client-ip=209.85.208.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QvAtfn06" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-5649c25369aso7540667a12.2 for ; Tue, 05 Mar 2024 00:12:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626339; x=1710231139; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=POVvCdCwqgBsDTzLmq+xlV1vSpeRHUQ3tEhlOTxlYcU=; b=QvAtfn06hEOHBpAMfE3/7kgoGVh4zy1rORx419jY+4HqbmgU5soklIL/gLPkLVBsgA 1B0reUcaWoJs5C4HXl01KeavQtYhuimdgh2+iWxcrWIlVP/fQcAhe0QfegdAGt4dTyWr uJucD5jGULN8nr/z7sP47+RSvK5WRzJ21bLrOcIYo6Ajbps4amTtcL6iIbA8Shl+LmrD 9CI/dXkmA+wRYV/uD0IyaVOBjJeeHJC5aSvlAMU8v486b4uuzQzZKkClCGl9PQFuIYEa QsUlyG7vUJm1CALR8m5jIeh+xcwFMx/9D1LlQ4Z7T25ltR2DP932mswo0tcXZApQMNIv C/aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626339; x=1710231139; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=POVvCdCwqgBsDTzLmq+xlV1vSpeRHUQ3tEhlOTxlYcU=; b=RT52XfugHWcirMk42u47OdEaUctClcRPwRP+4xKW9k2puZb5L0i53liQmr/IqZcsoB CNDNkf0/zK1CRgQ/srOnEtZkQk9YD819ced5hDLGRcyhCf570ta/rxdKKrrKj7OlWLQA QFHD5jSv+HE6F4kcqOcgcY1C+1puRsOJuHhWzl77vhggj29i5XYiS7ueh49/VL70p6Fn 9dPLQgKXA/RtxbxkjyfmPzqkoEwmmbGg7+QX4lsUYjj47Ysu8BLEaTb3DKWHsIdR+mbX FTL3lh69cvDVcaKM0kFwF2fIoV36qX5E77Kzz0Itf9LwlBmX6pGXsWZ6jDOnjAnx0epk IdMQ== X-Forwarded-Encrypted: i=1; AJvYcCWZBAIIa29dm3hQF/ddfwrN5T6OgRPR0PB+tr2CY+yoP7YEQW4gbQ1gerYC4S6jPvAL3KYi7ovur8TZkph7yVFEYsGm2IQwtHt+BS4= X-Gm-Message-State: AOJu0YyEEFQzQrIrgQavfqy2zvQvgv8lnfc7wfhS/lQnFDzfWSJCaTd3 pQzMAlOnpKJIy8EjgWPdk3Qzg756lHcy81PH9tuVC2Dwup4rUB0eKRXc9E9nZ/30Vwm4pjGxfil r X-Google-Smtp-Source: AGHT+IGOwgFjm9p+7mY8WcaCSk3d8VXb2bBW8TuCFZ36DSxBXROjoRrcLWhEMUftUIgCJZt6zZLL7w== X-Received: by 2002:aa7:c3d9:0:b0:567:38db:8076 with SMTP id l25-20020aa7c3d9000000b0056738db8076mr4309804edr.21.1709626339498; Tue, 05 Mar 2024 00:12:19 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:19 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:11:59 +0100 Subject: [PATCH v2 4/7] backlight: as3711_bl: Handle deferred probe Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-4-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=959; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=rLcNWyHrJ59PgQVMQdROdn158veQsUOWpOpARELHPHY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPYiTvjPqEeJttKrU7WiswuUE0dpbgygo9ZR 33m9uiM1euJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT2AAKCRDBN2bmhouD 12YgD/9IXBNCquP3bPqgvY8F0d6uhoxY77XF+TciANVjhfSwKpU37EewVGovz0Iqnt6HWaDWN6j F21SWV7MUAEoUrnIsLHKojTKz8CSXamKEGAjPAtUUXOMgjFneB7r1biTAbhkdeLR98b4MUJOdel 816YAtPIwC6d3RgCF19e5h8rGj2fxWNnb/qJTK/DKsNNN8L3m+lczzFyE3aFdcEcW/IrPEFlZ9r M8s6i3GDwbVINPBfSTKmJLYUJyLuyJiohQTgzlU7Nkcp6G2I4ufyiAmZP8/kmMG8w2ZAJ/M3y0e PvQ1z/ZuFfFqLvNZZiuL7IkG5UQJ3FVLtCIsure9tkDLyGUNsHIFutW4dHczc9HvFvi9pVzt6LK 7T6rw/26yrYKfCaBJEGn9zpVaxiAIl2XczCIo3Gz5Aygy/8U4p7y+oUa9qUawoutjLXtTCDbKIt OgbZlnYagsZCtaQGiMG5aFwX586KxBz9a4td3TUSq7L1Osa1d93WVbNetGeaLTTfoB1Rsu0SnSV YgXBWi7SbTL45BS82xRTGDrf+jctkC0oVC1qQELCRTwBzwH6QHUzn8lBPh+mJgViOMMWlqTpblo xumCSjPITNs0L4Yz2T6PqFn/0xK7RlnvQbgPxII4GvtnVm4lCbuJ0yCedULW9uBWchL02hx8wbK R9FlO8clmcCQD2Q== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Don't pollute dmesg on deferred probe and simplify the code with dev_err_probe(). Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/as3711_bl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/backlight/as3711_bl.c b/drivers/video/backlight/as3711_bl.c index 28437c2da0f5..e6f66bb35ef5 100644 --- a/drivers/video/backlight/as3711_bl.c +++ b/drivers/video/backlight/as3711_bl.c @@ -383,10 +383,8 @@ static int as3711_backlight_probe(struct platform_device *pdev) if (pdev->dev.parent->of_node) { ret = as3711_backlight_parse_dt(&pdev->dev); - if (ret < 0) { - dev_err(&pdev->dev, "DT parsing failed: %d\n", ret); - return ret; - } + if (ret < 0) + return dev_err_probe(&pdev->dev, ret, "DT parsing failed\n"); } if (!pdata->su1_fb && !pdata->su2_fb) { From patchwork Tue Mar 5 08:12:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 778124 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2228C80034 for ; Tue, 5 Mar 2024 08:12:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626344; cv=none; b=PUn0pObtJdndxIHgqVwFK6bAUUvjKOYkYgpYm6AVEBPQGGTopb8+bUFCvJg4zhq3smXDQhEkADv1t9b9pgUpAGGZV9kQzABzN6E1zuekuGle4ohYVx+B7OCMTBmdL8O3nrljVa7MXPprJN8rDVvfexkGQeJ6bPlaHewNMBZk7sM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626344; c=relaxed/simple; bh=zeZODmCY1S1uqMpI2blr7qYy9ZObZCI7jQk2MUKiyFQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aWll68/wwbMkQD+cE9q0OyAFTB8OMRXz8VvxxKBr+rqrPACui173oCmU98K5CjfEFnJ+fGau6qe2bcBoy1GEEZv6bnKNPV/VcwNLHumZmOxxwVDPqZ3RGygQPWnxZAasZCo1tdq1mjb4FW/i0el7LqgeOesyJLQpoyr3Z795nu8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=nIWujsfX; arc=none smtp.client-ip=209.85.208.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nIWujsfX" Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-56759dc7ea6so2324715a12.1 for ; Tue, 05 Mar 2024 00:12:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626341; x=1710231141; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ExK15caTzPYyfdwBopINcQ7SZOSz6etjc7XyN0ZMwpo=; b=nIWujsfXBoMvhjac9aKXXtnFOQBINMhT8PfnX0uMaNLk4qLp6lY6irBboTzhv7ysXE ZN4W+n3A/AGv//Rfvk8J5g0S4AJOkGhHorybOh/0XWj17T8BQYy7vnWTavT8/lOgk+lZ 69RlHZRj+vaID6YGgy3Cx0eDeZd49MZz/hpO+bUCqdI2IoiNCXq+04YWsJKXv0bISOTN duEEoTwHloAk0cROyp10a7rOcL1NcfGjuIefYVfwU+yVXtW0TJqc+9XmtsIUStwhktyD c02Y1JGF37pPjSLJOdh8mtlKF29jDSMz8b3Tgl3KPuy0TkxHm9s+QITIL4aCV6Jh4Gg4 haUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626341; x=1710231141; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ExK15caTzPYyfdwBopINcQ7SZOSz6etjc7XyN0ZMwpo=; b=RERRkno8uX4QF0kYZQGV+WGdu0ootIYB2fTZSQsogtwMvYdywZzOFXrZBUtNa0EYsj ER4wZCQAEotx95O6KYVx6KxkeuZvdAtwzG+kwksbI0nQ/UZLBJjp/KjNMLOi9l5Hrcjv EnUjknn76PN4TfomhDgg9Njj7HEldvgnCl22aW2FFVBeSp+Ky9ZYHuqNpxynQyIhzhsH QcYzi5LM08KOqbF41x9aclXwC1HUPz4hraDtPu6rKl855aU83GIz9vxCRoAjya4tOUAO NYR2ti+KKrpUb4uIehh1+FgpDHV/RShPTdZXw30VSEoi5U7u/E+uBGHjJkSeweOvBncZ A3hQ== X-Forwarded-Encrypted: i=1; AJvYcCX3fjBChJLiJV8TrvBUz6W4dRjJy4BePKFuKdc40uP2I3YW3AKji8RyedMIQyvRiWVm4zaDFM2mz+9NefEP6W9ad+uvn9zXRoexPtw= X-Gm-Message-State: AOJu0YyxIjvgKZjGvFKznm//TTWMkwIBLKvQxLk+LK2MlgWRGG61fbro bxd12Eaqb7j1pE1xZf8mSV+iP39ObDX1f5U2R2A3GD7IQkdIIfzHS6xPaOG4pi0bnJAMVt3xbGo G X-Google-Smtp-Source: AGHT+IH/uA8GkUvAAQ9ECD3IzSDFIVVQwU0E2DIbx0rKbCTdLIrwu2V+eRJ+cIeAiM/1pjiB98XZfA== X-Received: by 2002:a05:6402:2315:b0:565:6c72:40a9 with SMTP id l21-20020a056402231500b005656c7240a9mr7989319eda.28.1709626340845; Tue, 05 Mar 2024 00:12:20 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:20 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:12:00 +0100 Subject: [PATCH v2 5/7] backlight: lm3630a_bl: Handle deferred probe Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-5-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1069; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=zeZODmCY1S1uqMpI2blr7qYy9ZObZCI7jQk2MUKiyFQ=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPZD8MWfLYEt6rCWdnIjlfRQIRJw0u4/qqS+ k5T0+JBGS+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT2QAKCRDBN2bmhouD 12fvD/4o0bBt8fofIHD0XpWwJNvU3Os3cazAVsGlsrm4AuCVvGk4aJQUwr2TiCM3Tkz148/bo04 ehgJuqLPlK6rYX4fV7mjoMH5d11p0rH7Ik63fMZSXY6zDeOGCXR3nQQXSJ8Y1boQ0sqOCTS7FcA 4D+RC5tismY1qTv62ISrDmk2aVKW+UwAXM3Kt/rrxfN9sNQNh2XdZrdMN3QCwAsbyTAAM9k+Sah a7MNxdBbIVgGdUN2XZXri41Fy6WZXRCKDY34ISqggHrDp9u1q+JdB3Pvj68dwlBQthT7Cg7wEJP TA+vuZiV9M/TVJJT1sQXUs04vKn0BoVS9z6+h1tjhcNDWlJRFA63MIKJT2mw+v2UzcESTKY4scn ZHNt/lrucx4IoWVrEcqRxuEuvU5EDgG29iOl7BvCUattDGdpScEa5xxY7CCalBMIW26ip0r3jmf iyWE/FslUQjV5eWS4WgWzLeBFcKM7kMXojpndsq2Cl20ZQ9Zbb3wXMAKTlgAVroWrN845KAHvtK Ejq/Tcd680GH8y2/bWK/E9OQD2oP/K12UQltNNyvPVkO2NeQIaNAwRxOP3rBfGtlGhBrN1KYjp4 ZsngSrMfZarGq8cQ6ZjWGWsgbSWrk+CecKiGZLj+kijL6abbj/XTfgUojaUpKnlbDanESNAGN3u obK5/meKgl1VgFg== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Don't pollute dmesg on deferred probe and simplify the code with dev_err_probe(). Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/lm3630a_bl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c index a3412c936ca2..93fd6dbccc28 100644 --- a/drivers/video/backlight/lm3630a_bl.c +++ b/drivers/video/backlight/lm3630a_bl.c @@ -563,10 +563,9 @@ static int lm3630a_probe(struct i2c_client *client) /* pwm */ if (pdata->pwm_ctrl != LM3630A_PWM_DISABLE) { pchip->pwmd = devm_pwm_get(pchip->dev, "lm3630a-pwm"); - if (IS_ERR(pchip->pwmd)) { - dev_err(&client->dev, "fail : get pwm device\n"); - return PTR_ERR(pchip->pwmd); - } + if (IS_ERR(pchip->pwmd)) + return dev_err_probe(&client->dev, PTR_ERR(pchip->pwmd), + "fail : get pwm device\n"); pwm_init_state(pchip->pwmd, &pchip->pwmd_state); } From patchwork Tue Mar 5 08:12:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 778123 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8949880BF0 for ; Tue, 5 Mar 2024 08:12:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626347; cv=none; b=BXSLIdtol+KXqbpi4SUsxoZyBb3h0cMjdB4ENU2mI3PqHJWNwTkUZ3euhw7vSR2I2+iAkHStyy5ujfohxYSTk6CyooK8+RVNOC0WzGpHcQn03A5/svhiMfsXnJAEdK5MvcqCysIcIg+dlnBqvTN5qLxGuFIQ2p24weI8n2KpCY0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626347; c=relaxed/simple; bh=YHeoQ29NKf22XZpaybrdYUUdK12wkL0lEB4GhWf8FTY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=O9K2R6of0CU+NCas8orSX5FzQD3/o5EDyU7r21/3nml00uSEEC83nm8+JiOO/AUc3oeG7eEHczUGf0tV8Og4DcPKcfMNiNpyBvHK4hrp6XSyb3Saki7eYY9gpMBz5FppmtmZiizYikCbHXRirbGcCg8csKnHq0AbNjvk//k1z4k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=pILB9NXn; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="pILB9NXn" Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-56698eb5e1dso6987437a12.2 for ; Tue, 05 Mar 2024 00:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626342; x=1710231142; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0Fm6lCHtlVIF1F+K0N/OPMuiMCrX8DVXWnanpZaecTQ=; b=pILB9NXnIhHFh4XQLaoHRn0HXZN7TLGIwRq2XAjNoL6bb3QGlYLFEnZg+8KqnqCmY1 Ok+R1MBNIZgnzjKwAWcdEWymPbiiUtlghQ5rKzXEpT2reZZtzK7xVT+wi89Vc5NxNtwT /YaM51xik8wIqw6c6wzviYPHszIx3fYtD5M+TLSwcNlUi0NPP9RUXmClqV3Q7hY7ZIqW xyWCA73FrX7yJgvuJINRIDuNAuhsu2Bwue58srH0CXCo8UnCVWQsWgx/EgeMl3J/QLMQ eaHgaOrvijdqUSMlq5jfalJsLBPwIcFWj4UpXDw6LqnUOkYCEAKRt/dmbb8YYpra8KB0 Xc6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626342; x=1710231142; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0Fm6lCHtlVIF1F+K0N/OPMuiMCrX8DVXWnanpZaecTQ=; b=d4osJjzHj95wrCI9tsR1txiQ7hSDW4dtfkn+WfFX4w8zARKK1iIb/IZk3oQ9VxxE1x W+7oMKjDwaDXUdFSV4/tUJaN2YPri8HwiNlTlwKyy1Yx/etl1MkbI1nZAzApBbbmjRfV aYetOLzT9Bu/rxfyZHy6v0lFn1Cctv0DYUp1V9n627b5QJ6ZoDQtNDwIOl2ne07RDthY 0Y8ZxSJxR45aX5kMQNGk89QYhHPbFABjMkefsxtZ2w2xPoq6faNQFBsp6RvXroFp5kJ7 BF9ISnZt9lTgqpZ9ZM+AEb8m+qMs/wX55qOgPe2ztVy24EONROKft2gulla31kHY3Hu9 Qfpg== X-Forwarded-Encrypted: i=1; AJvYcCVxYOKa7Es9OCMChV+OfK734fr0bOV+B2+Kw5x8oEgr3xMtP/8XHYUMFvaONHYVg7ggy+zMiS49xdp48+5vsOdbujgRi6+mLMhZxZw= X-Gm-Message-State: AOJu0YxB59SAcnnYC7R/sOijQmmcG6ZIgLfb8HoGhySNdwdeiQLLv3Fr T9gX2HPsn1NMoyoeXBdTxJ9CqWDNpa6if70Trq81B5CMTVcsUr413BAUgJOHat+Zv1DF8U8DGZh l X-Google-Smtp-Source: AGHT+IFmQXq9OqnAqZ7n+ipcdaFFZ7KEXlOXnYPr+dCB5rotQlp6U8HU8sJNK8HhuEbg+62y8KfoNQ== X-Received: by 2002:a17:907:367:b0:a43:f020:57ed with SMTP id rs7-20020a170907036700b00a43f02057edmr7581833ejb.73.1709626342374; Tue, 05 Mar 2024 00:12:22 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:21 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:12:01 +0100 Subject: [PATCH v2 6/7] backlight: lm3630a_bl: Simplify probe return on gpio request error Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-6-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=961; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=YHeoQ29NKf22XZpaybrdYUUdK12wkL0lEB4GhWf8FTY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPaMO81r5PpyfYzgPlAboOMwxF1eOJg99FdH BQsx0i+aJqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT2gAKCRDBN2bmhouD 17VTD/wMe9QVJLWWgoGJhpJgK0qfzqPtG2LHvEiQKHIc9p4TZH6iIk89FjqgbQmllt/sCIdLPzD 5jCNPAb6QsYi5rBbHw9tXOW/fw/bA1XSeBdKReHR4xtnTd+Lp7ZEMe7thHzzhEXCEW+6AuW5Zh7 vdcnvZPWJcVUV9QokX7gskQsHOTHg8M9L11ICQnn2kgJqtBvffsN4z7tRx0gFY2BFkV390IFTZa hHlBhzDWyYxYAp4I5M7OUld5ga37cX1lmBM8aWaC1lj+UoSNe1XCQPvo2mp/0U+hEZGCkCW9T5c d478MV6wl1sAsoVRUq1VmXpOYK8+oi8beiW5SF7YWtT5knT7Z99N/kfc/MPdrN8WqThf+6TE6oN Cehjm5fjzjvLxM6INXJn34dwTXkGgagvWLL9SQwrOtTMAx3h/PBIGINvCaOzapuZeDwCS4vfvp5 CLS7LbPOYq/0XbEwySMM86UcHe7Is6dZHYqDXfMnEuxh5EPQUnDFiYrs01SINbxX5i/N8rT3ovc xaTofPHKif7mPAFTVBudQKQb0oQQwo14veJnxVLsXfapCKdnDEjrX4uqhtstonC6F3vNX9w97vX 5gsi4DlkZSWtsii/UFMd1cohSPSSv9zx8VS2TAbTXmafKMfVKjf5caGdDisNEoGNN96UoujMDcp krxxRUqlxMNOQRA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Code can be simpler: return directly when devm_gpiod_get_optional() failed. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/lm3630a_bl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c index 93fd6dbccc28..ac0a60e39e39 100644 --- a/drivers/video/backlight/lm3630a_bl.c +++ b/drivers/video/backlight/lm3630a_bl.c @@ -543,10 +543,8 @@ static int lm3630a_probe(struct i2c_client *client) pchip->enable_gpio = devm_gpiod_get_optional(&client->dev, "enable", GPIOD_OUT_HIGH); - if (IS_ERR(pchip->enable_gpio)) { - rval = PTR_ERR(pchip->enable_gpio); - return rval; - } + if (IS_ERR(pchip->enable_gpio)) + return PTR_ERR(pchip->enable_gpio); /* chip initialize */ rval = lm3630a_chip_init(pchip); From patchwork Tue Mar 5 08:12:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 778671 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A22A280BF4 for ; Tue, 5 Mar 2024 08:12:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626347; cv=none; b=J/kTmYEHqtJxJzgSA70/1XbGrBupuyQS1ZLG2IqpH96Na0V9J2caQ8+ghqC+xmjbVrRqQQAtjBtiuP4b92QjQE0E3Avb5n9U3GAJ3E886rW1jmNhvBI7bEpvipQS+R874nDCuXLawdx5L6jckKTeglTViLEQWJMuMhAOz8kI/9c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626347; c=relaxed/simple; bh=inLsT1VkNNpcQ91Wz4F9uFHvSwYM79hrTLwE/rxQxRQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I6ltk0y3X3A6NPsxkixpy/jM6EFSYFbDszW+NWYerH7oAZOm31mMhhs2JPsv0WGeV+rj6PiCpWx5AHuolvMpBsd39twixd7zwf6FLF04DF5zRZdD3qUZyWY1AzsHw6iM0Kc5PE68SLjmUsyMXl3DowyM2C/ToD4rDWNn3zbYaak= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Pjgd7zpV; arc=none smtp.client-ip=209.85.208.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Pjgd7zpV" Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-56657bcd555so6663110a12.3 for ; Tue, 05 Mar 2024 00:12:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709626344; x=1710231144; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WIh814IMUk5rVefYqFVUgBnp3hq65uUsqUe2ecL/Y00=; b=Pjgd7zpVB7TIBolZQKc0cHSLkT2lzxIPb7KQHaxsyWYdtnWwIO9K8B3xALdqLklKma nPyejfGHU3UAEkHj3qdgaGWZTvtbggtnlj7mJbEtg9raZL1dIK1mHOMcnKf8g/yOtUiY N0icsDQ2pH+vv4HTWqiEp0BbWYPMFj/Rx54RBhfFrqvPelkiEw5YBk8C0P55X9NXq4dB 6UgybzD1v3afraoegttkeDa1DGXhR3YcyT4puinWyhLfclNOJXcL7CMqu6HP/m9EHqJQ bsIS+ot/cDF650X8radAqRzbthixwfsGhCuDqQGfLDpiUpbk/nZ3gSq36AXLrNCD8ADq X80g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709626344; x=1710231144; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WIh814IMUk5rVefYqFVUgBnp3hq65uUsqUe2ecL/Y00=; b=e14oyuSeMYLx+7WH/KP9i5V9AHAA0F/nC4nLbKuPhfKUvzuMviRphNvPHzB/TJ4lqU /4Dl0AYHK8fchOBSkPQade+usUIDIjyhZPUQpsvQz7g8doZJYY9PiZjM/CExlm7T2J7k kolIS9Ive42cEo/xFctzsyW/p3uE1Zqjcu4uk475XKgbqHUQIZSDRe9OcVAUH1NKcPIV Ugjs+6Ev65+905lqhC9Vem9zntrsHlOOg7BoftDOSrW12kCyi8IIC8VsuHCBQq1db7ZV szZV18ncXMLmD1YmraCq2EJwPjQKGGsWyh6uc07y8WO/VZcHeki9xNRh8eYAdVZfLwLH NeVw== X-Forwarded-Encrypted: i=1; AJvYcCXiWwN1O3ceby2NgejBCTHDNkKOkvafXGJyub86cMCbrsGz2bvMhb424K1VzHz+1RnfEHB2at5wES6rdW3DbBWlirVxsS3ep0Y54Hc= X-Gm-Message-State: AOJu0Yy96NcVM5nfGw/fHpoPR4gwWMDpr2dhr/xfD3SePJbc6qVN4INt crKGiK5rtxxRhrFyIJ0MA/WAIaw9EoELX4bEJpCbI2agqYKfH+qas1z7ntIj3c3zdYiXOPMx0p1 v X-Google-Smtp-Source: AGHT+IF1NY0Hm8ivs7aO2+SykkAen2RzTu+xu239XL5G/CqAmL0kvEQP4pA0JwC31R81oKLIggZO+g== X-Received: by 2002:a50:8d8d:0:b0:565:665b:9c82 with SMTP id r13-20020a508d8d000000b00565665b9c82mr7135380edh.8.1709626343919; Tue, 05 Mar 2024 00:12:23 -0800 (PST) Received: from [127.0.1.1] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id cq16-20020a056402221000b005672a346a8fsm2761557edb.57.2024.03.05.00.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:12:23 -0800 (PST) From: Krzysztof Kozlowski Date: Tue, 05 Mar 2024 09:12:02 +0100 Subject: [PATCH v2 7/7] backlight: pandora_bl: Drop unneeded ENOMEM error message Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240305-backlight-probe-v2-7-609b0cf24bde@linaro.org> References: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> In-Reply-To: <20240305-backlight-probe-v2-0-609b0cf24bde@linaro.org> To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=920; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=inLsT1VkNNpcQ91Wz4F9uFHvSwYM79hrTLwE/rxQxRQ=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBl5tPbyLAGnwidHT2FhDojPQp4jpY01sPQHqOsh 1z/ozH7T0iJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZebT2wAKCRDBN2bmhouD 12mnD/47jc0NyWr3MU/W4BdsljAD/lH82VZh/9UG6ndVSQ118crkgBJGB86mt0+q+Grx5gxZCNN iarLv2GUAyMLnhsbsH0qm9lS0pkbkldTzyH0PDiOZTQ5NqvlHwhsOzSOlnBwx1aTV4jD6cZ3Wre X8lLUBtRlWqBZokl19oxqnNv33aKv5wby2A3pG6NnDT9pQAVhJSPTQKhIU8toq5pJFDZ26+ZR1h Ij3ea7Y2uuFPzhKfX/1F7/4RIHOr1arNpK5UrLfqVYz6U1KW8fSYp1dEXPHtNVAZa/WyNOIvuet qAs4Wbcs7dK9dUwJvYodbX1Mu1rL9eL31DP584V/kvHGD5Fa/QKXSNYZeni9QHR20ePfn51AGtF mwY+6TEK2OeD4bZONtbfdE+rFQczSLeHZrLJR5ikdjpz1jhc4qNtZHt9KykjnmP3ZU0gu+R+OFH aXfu+83AM9jkHbHtXg2tfKmJ2wneXwA/BRsK8pA8uGSYi8xWnWdf3+2vS3U8xYXeC6c3m4ssWeW PgZPuWc9qxZx4oVWeqBtW+8OS7Al0h591hqL5qhY5xaP7nPflBUbJX5nvmTOoXN/sJyxCvWDcT1 eN9R+7hv/QsHEIHSXMoiJzEo08OjuN9VGUeyn3Gf5ljzobDGTG/m0r3R6/1HYdLlXkHEXxLgF4u u9l+0dt1vrXNYpw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Core code already prints detailed information about failure of memory allocation. Reviewed-by: Daniel Thompson Signed-off-by: Krzysztof Kozlowski --- drivers/video/backlight/pandora_bl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/backlight/pandora_bl.c b/drivers/video/backlight/pandora_bl.c index f946470ce9f6..51faa889e01f 100644 --- a/drivers/video/backlight/pandora_bl.c +++ b/drivers/video/backlight/pandora_bl.c @@ -114,10 +114,8 @@ static int pandora_backlight_probe(struct platform_device *pdev) u8 r; priv = devm_kmalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); - if (!priv) { - dev_err(&pdev->dev, "failed to allocate driver private data\n"); + if (!priv) return -ENOMEM; - } memset(&props, 0, sizeof(props)); props.max_brightness = MAX_USER_VALUE;