CRAS: cras_udev - zero USB card info when created

USB card info is used to derive the device's stable ID.
If any of USB properties that are part of card info is not
properly initialized (which was the case when reading USB
system attributes failed), stable ID will be derived from
unpredictable data - and end up being unstable across reboots.

BUG=chromium:678090
TEST=1. plug in USB headset,
     2. change active output to another device,
     3. unplug the USB headset
     4. reboot
     5. plug the USB headset again
     6. verify that the USB headset is not activated

Change-Id: I986be152ca6bd97431766d745ffa023afe973237
Reviewed-on: https://chromium-review.googlesource.com/424938
Commit-Ready: Toni Barzic <tbarzic@chromium.org>
Tested-by: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
1 file changed