Skip to content

Commit 01043e3

Browse files
committed
ALSA: pcm: 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 such a sprintf() call straightforwardly with the new helper. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 0031812 commit 01043e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/core/pcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ static ssize_t pcm_class_show(struct device *dev,
10311031
str = "none";
10321032
else
10331033
str = strs[pcm->dev_class];
1034-
return sprintf(buf, "%s\n", str);
1034+
return sysfs_emit(buf, "%s\n", str);
10351035
}
10361036

10371037
static DEVICE_ATTR_RO(pcm_class);

0 commit comments

Comments
 (0)