drm/aspeed: Propagate DAC mux register update errors
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")
Signed-off-by Avi Weiss <[email protected]>
--- 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
@@ -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