0058f8eb | 06-Nov-2024 |
Luo Yifan <luoyifan@cmss.chinamobile.com> |
ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div()
[ Upstream commit 23569c8b314925bdb70dd1a7b63cfe6100868315 ]
This patch checks if div is less than or equal to zero (div <=
ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div()
[ Upstream commit 23569c8b314925bdb70dd1a7b63cfe6100868315 ]
This patch checks if div is less than or equal to zero (div <= 0). If div is zero or negative, the function returns -EINVAL, ensuring the division operation is safe to perform.
Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com> Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com> Link: https://patch.msgid.link/20241107015936.211902-1-luoyifan@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
69d0fd34 | 31-Aug-2023 |
Takashi Iwai <tiwai@suse.de> |
ASoC: dmaengine: Drop unused iov_iter for process callback
Passing the iov_iter to the process callback is rather buggy, as the iterator has been already processed for playback. Similarly, it makes
ASoC: dmaengine: Drop unused iov_iter for process callback
Passing the iov_iter to the process callback is rather buggy, as the iterator has been already processed for playback. Similarly, it makes the copy for capture buggy after the process callback reading the iterator out. Moreover, all existing process callbacks don't refer to the passed iterator at all. So, it's better to drop the argument from the process callback.
Fixes: 9bebd65443c1 ("ASoC: dmaengine: Use iov_iter for process callback, too") Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/CAHk-=wje+VkXjjfVTmK-uJdG_M5=ar14QxAwK+XDiq07k_pzBg@mail.gmail.com Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230831130457.8180-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
c4d4ce48 | 15-Mar-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
ASoC: stm: stm32_spdifrx: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible
ASoC: stm: stm32_spdifrx: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void.
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230315150745.67084-140-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
a3bd37e2 | 15-Mar-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
ASoC: stm: stm32_sai_sub: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible
ASoC: stm: stm32_sai_sub: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void.
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230315150745.67084-139-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
607e4cf5 | 15-Mar-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
ASoC: stm: stm32_i2s: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to d
ASoC: stm: stm32_i2s: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void.
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230315150745.67084-138-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
7c0f8f14 | 10-Nov-2022 |
Olivier Moysan <olivier.moysan@foss.st.com> |
ASoC: stm32: i2s: remove irqf_oneshot flag
The IRQF_ONESHOT flag allows to ensure that the interrupt is not unmasked after the hard interrupt context handler has been executed and the thread has bee
ASoC: stm32: i2s: remove irqf_oneshot flag
The IRQF_ONESHOT flag allows to ensure that the interrupt is not unmasked after the hard interrupt context handler has been executed and the thread has been woken. The interrupt line is unmasked after the thread handler function has been executed.
The STM32 I2S driver does not implement a threaded IRQ handler. So, the IRQF_ONESHOT flag is not useful in I2S driver. Remove this flag to allow the interrupt routine to be managed as a thread in RT mode.
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Link: https://lore.kernel.org/r/20221110084406.287117-1-olivier.moysan@foss.st.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
16b51447 | 27-Sep-2022 |
Mark Brown <broonie@kernel.org> |
Fix PM disable depth imbalance in stm32 probe
Merge series from Zhang Qilong <zhangqilong3@huawei.com>:
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed o
Fix PM disable depth imbalance in stm32 probe
Merge series from Zhang Qilong <zhangqilong3@huawei.com>:
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced. We fix it by moving pm_runtime_enable to the endding of probe.
show more ...
|
0325cc0a | 27-Sep-2022 |
Zhang Qilong <zhangqilong3@huawei.com> |
ASoC: stm32: spdifrx: Fix PM disable depth imbalance in stm32_spdifrx_probe
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to
ASoC: stm32: spdifrx: Fix PM disable depth imbalance in stm32_spdifrx_probe
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. We fix it by moving pm_runtime_enable to the endding of stm32_spdifrx_probe.
Fixes:ac5e3efd55868 ("ASoC: stm32: spdifrx: add pm_runtime support")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com> Link: https://lore.kernel.org/r/20220927142601.64266-3-zhangqilong3@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|