Commit 4673dec8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dmitry Baryshkov
Browse files

drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe()



The devm_drm_panel_alloc() function returns error pointers, it doesn't
return NULL.  Update the check to match.

Fixes: 4fca6849 ("drm/panel: Add Novatek NT37801 panel driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarJessica Zhang <quic_jesszhan@quicinc.com>
Link: https://lore.kernel.org/r/aDCdn9r_ZAUTRpWn@stanley.mountain


Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
parent 022546cd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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),