Skip to content
Commit 014cea59 authored by Colin Ian King's avatar Colin Ian King Committed by Takashi Iwai
Browse files

ALSA: xen-front: fix unsigned error check on return from to_sndif_format



The negative error return from the call to to_sndif_format is being
assigned to an unsigned 8 bit integer and hence the check for a negative
value is always going to be false.  Fix this by using ret as the error
return and hence the negative error can be detected and assign
the u8 sndif_format to ret if there is no error.

Detected by CoverityScan, CID#1469385 ("Unsigned compared against 0")

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamoccchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 3d624617
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment