alsa: Check sdi and sdi->priv before derefencing them

This commit fixes bug #28