* [PATCH next] drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe()
@ 2025-05-23 16:09 Dan Carpenter
2025-05-23 16:31 ` Jessica Zhang
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2025-05-23 16:09 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Krzysztof Kozlowski, Neil Armstrong, Jessica Zhang,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Linus Walleij, dri-devel, linux-kernel,
kernel-janitors
The devm_drm_panel_alloc() function returns error pointers, it doesn't
return NULL. Update the check to match.
Fixes: 4fca6849864d ("drm/panel: Add Novatek NT37801 panel driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/gpu/drm/panel/panel-novatek-nt37801.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt37801.c b/drivers/gpu/drm/panel/panel-novatek-nt37801.c
index 84d367eab058..d6a37d7e0cc6 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt37801.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt37801.c
@@ -257,8 +257,8 @@ static int novatek_nt37801_probe(struct mipi_dsi_device *dsi)
ctx = devm_drm_panel_alloc(dev, struct novatek_nt37801, panel,
&novatek_nt37801_panel_funcs,
DRM_MODE_CONNECTOR_DSI);
- if (!ctx)
- return -ENOMEM;
+ if (IS_ERR(ctx))
+ return PTR_ERR(ctx);
ret = devm_regulator_bulk_get_const(dev,
ARRAY_SIZE(novatek_nt37801_supplies),
--
2.47.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH next] drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe()
2025-05-23 16:09 [PATCH next] drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe() Dan Carpenter
@ 2025-05-23 16:31 ` Jessica Zhang
2025-05-23 17:05 ` Krzysztof Kozlowski
2025-05-23 21:43 ` Dmitry Baryshkov
2 siblings, 0 replies; 4+ messages in thread
From: Jessica Zhang @ 2025-05-23 16:31 UTC (permalink / raw)
To: Dan Carpenter, Krzysztof Kozlowski
Cc: Krzysztof Kozlowski, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Linus Walleij, dri-devel, linux-kernel, kernel-janitors
On 5/23/2025 9:09 AM, Dan Carpenter wrote:
> The devm_drm_panel_alloc() function returns error pointers, it doesn't
> return NULL. Update the check to match.
>
> Fixes: 4fca6849864d ("drm/panel: Add Novatek NT37801 panel driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
> ---
> drivers/gpu/drm/panel/panel-novatek-nt37801.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt37801.c b/drivers/gpu/drm/panel/panel-novatek-nt37801.c
> index 84d367eab058..d6a37d7e0cc6 100644
> --- a/drivers/gpu/drm/panel/panel-novatek-nt37801.c
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt37801.c
> @@ -257,8 +257,8 @@ static int novatek_nt37801_probe(struct mipi_dsi_device *dsi)
> ctx = devm_drm_panel_alloc(dev, struct novatek_nt37801, panel,
> &novatek_nt37801_panel_funcs,
> DRM_MODE_CONNECTOR_DSI);
> - if (!ctx)
> - return -ENOMEM;
> + if (IS_ERR(ctx))
> + return PTR_ERR(ctx);
>
> ret = devm_regulator_bulk_get_const(dev,
> ARRAY_SIZE(novatek_nt37801_supplies),
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH next] drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe()
2025-05-23 16:09 [PATCH next] drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe() Dan Carpenter
2025-05-23 16:31 ` Jessica Zhang
@ 2025-05-23 17:05 ` Krzysztof Kozlowski
2025-05-23 21:43 ` Dmitry Baryshkov
2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-23 17:05 UTC (permalink / raw)
To: Dan Carpenter, Krzysztof Kozlowski
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
dri-devel, linux-kernel, kernel-janitors
On 23/05/2025 18:09, Dan Carpenter wrote:
> The devm_drm_panel_alloc() function returns error pointers, it doesn't
> return NULL. Update the check to match.
>
> Fixes: 4fca6849864d ("drm/panel: Add Novatek NT37801 panel driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH next] drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe()
2025-05-23 16:09 [PATCH next] drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe() Dan Carpenter
2025-05-23 16:31 ` Jessica Zhang
2025-05-23 17:05 ` Krzysztof Kozlowski
@ 2025-05-23 21:43 ` Dmitry Baryshkov
2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2025-05-23 21:43 UTC (permalink / raw)
To: Krzysztof Kozlowski, Dan Carpenter
Cc: Krzysztof Kozlowski, Neil Armstrong, Jessica Zhang,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Linus Walleij, dri-devel, linux-kernel,
kernel-janitors
On Fri, 23 May 2025 19:09:03 +0300, Dan Carpenter wrote:
> The devm_drm_panel_alloc() function returns error pointers, it doesn't
> return NULL. Update the check to match.
>
>
Applied to drm-misc-next-fixes, thanks!
[1/1] drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe()
commit: 4673dec88da803fa23f1af9e04761683a30dd6aa
Best regards,
--
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-23 21:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 16:09 [PATCH next] drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe() Dan Carpenter
2025-05-23 16:31 ` Jessica Zhang
2025-05-23 17:05 ` Krzysztof Kozlowski
2025-05-23 21:43 ` Dmitry Baryshkov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.