summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Dewar <alex.dewar90@gmail.com>2020-08-24 18:44:03 +0100
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2020-09-08 13:33:24 +0200
commit3f614236406f4642306b59a5659760ebf0ce9087 (patch)
treee75de42a0f0e941475991b1194e675928b32c70b
parent3f9dfc2a0ea9f8f34229d43e3a171c8aaf1dcaf4 (diff)
video: fbdev: sstfb: replace spurious snprintf() with sprintf()
par->vgapass is a u8, so if we are assuming that buf is at least PAGE_SIZE then the extra checking is pointless. Signed-off-by: Alex Dewar <alex.dewar90@gmail.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Arnd Bergmann <arnd@arndb.de> [b.zolnierkie: minor patch summary fixup] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200824174407.429817-1-alex.dewar90@gmail.com
-rw-r--r--drivers/video/fbdev/sstfb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/sstfb.c b/drivers/video/fbdev/sstfb.c
index afe6d1b7c3a0..c05cdabeb11c 100644
--- a/drivers/video/fbdev/sstfb.c
+++ b/drivers/video/fbdev/sstfb.c
@@ -733,7 +733,7 @@ static ssize_t show_vgapass(struct device *device, struct device_attribute *attr
{
struct fb_info *info = dev_get_drvdata(device);
struct sstfb_par *par = info->par;
- return snprintf(buf, PAGE_SIZE, "%d\n", par->vgapass);
+ return sprintf(buf, "%d\n", par->vgapass);
}
static struct device_attribute device_attrs[] = {