ALSA: hdspm: Fix zero-division
authorTakashi Iwai <tiwai@suse.de>
Mon, 29 Feb 2016 13:32:42 +0000 (14:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Mar 2016 23:31:55 +0000 (15:31 -0800)
commit080c4a4464ccafd42dbf3e329b9f757847d12a79
tree3d9e9e3b0b7949c2b098521a894411fe12b6b2e0
parente3d2f6980030a66bc1ea7e7cbaf7a01b09755e81
ALSA: hdspm: Fix zero-division

commit c1099c3294c2344110085a38c50e478a5992b368 upstream.

HDSPM driver contains a code issuing zero-division potentially in
system sample rate ctl code.  This patch fixes it by not processing
a zero or invalid rate value as a divisor, as well as excluding the
invalid value to be passed via the given ctl element.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/rme9652/hdspm.c