Commit 3f614236 authored by Alex Dewar's avatar Alex Dewar Committed by Bartlomiej Zolnierkiewicz

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: default avatarAlex 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: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200824174407.429817-1-alex.dewar90@gmail.com
parent 3f9dfc2a
......@@ -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[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment