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 <tiwai@suse.de>
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