From: Kah Jing Lee <kah.jing.lee@xxxxxxxxx>
Fix the max_retry value because the value is truncated at scnprintf format
specifier, with added hex symbol and newline.
Signed-off-by: Kah Jing Lee <kah.jing.lee@xxxxxxxxx>
---
drivers/firmware/stratix10-rsu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-rsu.c
index e51c95f8d445..98ec39f6dae8 100644
--- a/drivers/firmware/stratix10-rsu.c
+++ b/drivers/firmware/stratix10-rsu.c
@@ -405,8 +405,7 @@ static ssize_t max_retry_show(struct device *dev,
if (!priv)
return -ENODEV;
- return scnprintf(buf, sizeof(priv->max_retry),
- "0x%08x\n", priv->max_retry);
+ return scnprintf(buf, PAGE_SIZE, "0x%08x\n", priv->max_retry);
}