Skip to contentSkip to conversation

drm/gud: fix accidentally deleted IS_ERR() check

PATCH In review Ruben Wauters 3 participants 6 messages Sep 22, 2025 – Sep 23, 2025 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Ruben Wauters

author maintainer
#1 lore raw

PATCH 1/1 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")
---
 drivers/gpu/drm/gud/gud_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/gud/gud_connector.c +1 -1
index 62e349b06dbe..1726a3fadff8 100644
@@ -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;
Signature · 1 line
2.49.1
maintainer Reviewed-by on v1 1/1
#2 lore raw

Am 22.09.25 um 19:32 schrieb Ruben Wauters:

Quoted 6 lines

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.

Quoted 7 lines

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")
Quoted 17 lines
---
  drivers/gpu/drm/gud/gud_connector.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/gud/gud_connector.c +1 -1
index 62e349b06dbe..1726a3fadff8 100644
@@ -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;
Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
#3 lore raw
In reply to Ruben Wauters

FYI I got the following warnings. I'll fix them when I merge the patch.

-:6: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 2d2f1dc74cfb ("drm: gud: replace WARN_ON/WARN_ON_ONCE with drm versions")' #6:
During conversion of WARN_ON_ONCE to drm_WARN_ON_ONCE in commit

-:15: WARNING:BAD_REPORTED_BY_LINK: Reported-by: should be immediately followed by Closes: with a URL to the report #15:

Am 22.09.25 um 19:32 schrieb Ruben Wauters:

Quoted 30 lines

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")
---
  drivers/gpu/drm/gud/gud_connector.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/gud/gud_connector.c +1 -1
index 62e349b06dbe..1726a3fadff8 100644
@@ -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;
Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
author maintainer
#5 lore raw
In reply to Thomas Zimmermann
Quoted 9 lines · Thomas Zimmermann

FYI I got the following warnings. I'll fix them when I merge the patch.

-:6: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 2d2f1dc74cfb
("drm: gud: replace WARN_ON/WARN_ON_ONCE with drm versions")' #6:
During conversion of WARN_ON_ONCE to drm_WARN_ON_ONCE in commit

I'm not 100% sure why it's complaining about this one, the format matches. I assume it's a problem with the line break in it? but I'm not 100% sure.

Quoted 6 lines

-:15: WARNING:BAD_REPORTED_BY_LINK: Reported-by: should be immediately
followed by Closes: with a URL to the report
#15:

I believe it's intentional to have two reported bys in a row, as both of them are followed by a Closes tag at the end.

Thanks

Quoted 39 lines

Am 22.09.25 um 19:32 schrieb Ruben Wauters:

Quoted 38 lines

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")

Closes:
https://lore.kernel.org/r/[email protected]/

---
  drivers/gpu/drm/gud/gud_connector.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/gud/gud_connector.c +0 -0
index 62e349b06dbe..1726a3fadff8 100644
@@ -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);

drivers/gpu/drm/gud/gud_connector.c +0 -1
-			if (drm_WARN_ON_ONCE(connector_state-
Quoted 1 line

connector->dev, state_val))

drivers/gpu/drm/gud/gud_connector.c +1 -0
+			if (drm_WARN_ON_ONCE(connector_state-
Quoted 1 line

connector->dev, IS_ERR(state_val)))

   return PTR_ERR(state_val);
   val = *state_val;

#6 lore raw

Hi

Am 23.09.25 um 11:38 schrieb Ruben Wauters:

Quoted 14 lines · Thomas Zimmermann
Quoted 9 lines

FYI I got the following warnings. I'll fix them when I merge the patch.

-:6: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 2d2f1dc74cfb
("drm: gud: replace WARN_ON/WARN_ON_ONCE with drm versions")' #6:
During conversion of WARN_ON_ONCE to drm_WARN_ON_ONCE in commit

I'm not 100% sure why it's complaining about this one, the format matches. I assume it's a problem with the line break in it? but I'm not 100% sure.

Quoted 8 lines
Quoted 6 lines

-:15: WARNING:BAD_REPORTED_BY_LINK: Reported-by: should be immediately
followed by Closes: with a URL to the report
#15:

I believe it's intentional to have two reported bys in a row, as both of them are followed by a Closes tag at the end.

Neither warning is really your fault. As you say the script doesn't like line breaks in certain places. It also only wants pairs of Closes/R-b tags.

Best regards
Thomas

Quoted 42 lines

Thanks

Quoted 39 lines

Am 22.09.25 um 19:32 schrieb Ruben Wauters:

Quoted 38 lines

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")

Closes:
https://lore.kernel.org/r/[email protected]/

---
   drivers/gpu/drm/gud/gud_connector.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/gud/gud_connector.c +1 -1
index 62e349b06dbe..1726a3fadff8 100644
@@ -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-
Quoted 1 line

connector->dev, IS_ERR(state_val)))

   return PTR_ERR(state_val);

   val = *state_val;

Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)