rust-vmm / vhost-device

'vhost-user' device backends workspace
Apache License 2.0
68 stars 48 forks source link

sound/alsa: Handle Error instead of unwrapping #649

Closed dorindabassey closed 5 months ago

dorindabassey commented 7 months ago

Summary of the PR

Instead of unwrapping the result of PCM::new(), which could potentially lead to a runtime panic if PCM::new() returns an error, use a match statement to handle the error gracefully.

Requirements

Before submitting your PR, please make sure you addressed the following requirements: