usb: gadget: u_audio: remove cached period bytes value
Substream period size potentially can be changed in runtime, however this is not accounted in the data copying routine, the change replaces the cached value with an actual value from substream runtime. As a side effect the change also removes a potential division by zero in u_audio_iso_complete() function, if there is a race with uac_pcm_hw_free(), which sets prm->period_size to 0. Fixes: 132fcb46 ("usb: gadget: Add Audio Class 2.0 Driver") Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: NEugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
Showing
想要评论请 注册 或 登录