From: Ruben Wauters Date: Mon, 22 Sep 2025 17:32:20 +0000 (+0100) Subject: drm/gud: fix accidentally deleted IS_ERR() check X-Git-Tag: v6.19-rc1~157^2~24^2~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=915c306164f7e6187973855f75b4b1af7bc1d6ff;p=thirdparty%2Fkernel%2Flinux.git drm/gud: fix accidentally deleted IS_ERR() check During conversion of WARN_ON_ONCE to drm_WARN_ON_ONCE in commit 2d2f1dc74cfb ("drm: gud: replace WARN_ON/WARN_ON_ONCE with drm versions"), the IS_ERR check was accidentally removed, breaking the gud_connector_add_properties() function, as any valid pointer in state_val would produce an error. The warning was reported by kernel test robot, and is fixed in this patch. Fixes: 2d2f1dc74cfb ("drm: gud: replace WARN_ON/WARN_ON_ONCE with drm versions") Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202509212215.c8v3RKmL-lkp@intel.com/ Signed-off-by: Ruben Wauters Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20250922173836.5608-1-rubenru09@aol.com --- diff --git a/drivers/gpu/drm/gud/gud_connector.c b/drivers/gpu/drm/gud/gud_connector.c index 62e349b06dbef..1726a3fadff8a 100644 --- a/drivers/gpu/drm/gud/gud_connector.c +++ b/drivers/gpu/drm/gud/gud_connector.c @@ -593,7 +593,7 @@ int gud_connector_fill_properties(struct drm_connector_state *connector_state, unsigned int *state_val; state_val = gud_connector_tv_state_val(prop, &connector_state->tv); - if (drm_WARN_ON_ONCE(connector_state->connector->dev, state_val)) + if (drm_WARN_ON_ONCE(connector_state->connector->dev, IS_ERR(state_val))) return PTR_ERR(state_val); val = *state_val;