Skip to content

Commit 7450320

Browse files
committed
ALSA: ac97: Replace sprintf() with sysfs_emit()
For sysfs outputs, it's safer to use a new helper, sysfs_emit(), instead of the raw sprintf() & co. This patch replaces the open code straightforwardly with a new helper. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent a3b5d47 commit 7450320

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/ac97/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ static ssize_t vendor_id_show(struct device *dev,
460460
{
461461
struct ac97_codec_device *codec = to_ac97_device(dev);
462462

463-
return sprintf(buf, "%08x", codec->vendor_id);
463+
return sysfs_emit(buf, "%08x", codec->vendor_id);
464464
}
465465
DEVICE_ATTR_RO(vendor_id);
466466

0 commit comments

Comments
 (0)