[PATCH] drm/aspeed: Propagate DAC mux register update errors

Avi Weiss thnkslprpt at gmail.com
Sat Oct 10 23:47:14 PDT 2026


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")
Signed-off-by: Avi Weiss <thnkslprpt at gmail.com>
---
 drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
index c8746766f258..a933ad358852 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
@@ -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;
 }
-- 
2.43.0




More information about the linux-arm-kernel mailing list