From f3537ede21d0bc5b34835988752523b08459c532 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 16 Sep 2026 15:05:58 +0200 Subject: [PATCH] alsa-info: Skip reading empty SoundWire device info The SoundWire device status information is gathered from ACPI adr sysfs files, but since we take only the entries for the known vendors, this list can be empty, resulting in no $TEMPDIR/sdwstatus.tmp file created. This will end up with the unexpected (non-fatal) errors for alsa-info.sh. For addressing it, add the check of the existence of tmp file before reading it. Link: https://bugzilla.suse.com/show_bug.cgi?id=1279431 Signed-off-by: Takashi Iwai --- alsa-info/alsa-info.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index eac3694..1ec11a3 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -549,7 +549,9 @@ echo "" >> $FILE echo "!!ACPI SoundWire Device Status Information" >> $FILE echo "!!---------------" >> $FILE echo "" >> $FILE -cat $TEMPDIR/sdwstatus.tmp >> $FILE +if [ -f $TEMPDIR/sdwstatus.tmp ]; then + cat $TEMPDIR/sdwstatus.tmp >> $FILE +fi echo "" >> $FILE echo "" >> $FILE echo "!!Kernel Information" >> $FILE -- 2.52.0