--- sound/pci/hda/hda_intel.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c
@@ -1858,6 +1858,12 @@ static int azx_position_ok(struct azx *c
if (!bdl_pos_adj[chip->dev_index]) return 1; /* no delayed ack */
+ if (azx_dev->period_bytes == 0) { + printk(KERN_WARNING
+ "hda-intel: Divide by zero was avoided " + "in azx_dev->period_bytes.\n");
+ return 0; + }
if (pos % azx_dev->period_bytes > azx_dev->period_bytes / 2) return 0; /* NG - it's below the period boundary */
return 1; /* OK, it's fine */
----------
> --- linux-2.6.33-rc6/sound/pci/hda/hda_intel.c 2010-01-28 18:06:20.000000000 -0500
> +++ linux-2.6.33-rc6-work/sound/pci/hda/hda_intel.c 2010-02-05 15:55:48.116620701 -0500 > @@ -1858,6 +1878,12 @@
> > if (!bdl_pos_adj[chip->dev_index])
> return 1; /* no delayed ack */ > + if (azx_dev->period_bytes == 0) {
> + printk(KERN_WARNING > + "hda-intel: Divide by zero was avoided "
> + "in azx_dev->period_bytes.\n"); > + return 0;
> + } > if (pos % azx_dev->period_bytes > azx_dev->period_bytes / 2)
> return 0; /* NG - it's below the period boundary */ > return 1; /* OK, it's fine */