Skip to contentSkip to conversation

drm/aspeed: Propagate DAC mux register update errors

PATCH New Avi Weiss 1 participant 1 message Oct 11

Subsystems (4)
lore
Share & tools
lore

Avi Weiss

author
#0 lore raw

PATCH 1/1 drm/aspeed: Propagate DAC mux register update errors

dac_mux_store() currently returns 0 when regmap_update_bits() fails, implying a zero-length write instead of the actual error.

Return the negative error code itself for observability. No obvious reason that this return should be clobbered to zero.

Fixes 696029eb36c0 ("drm/aspeed: Add sysfs for output settings")
---
 drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +1 -1
index c8746766f258..a933ad358852 100644
@@ -268,7 +268,7 @@ static ssize_t dac_mux_store(struct device *dev, struct device_attribute *attr,
 
 	rc = regmap_update_bits(priv->scu, priv->dac_reg, 0x30000, val << 16);
 	if (rc < 0)
-		return 0;
+		return rc;
 
 	return count;
 }
Signature · 1 line
2.43.0