Commit 96632819 authored by Kunihiko Hayashi's avatar Kunihiko Hayashi Committed by Greg Kroah-Hartman
Browse files

spi: sn-f-ospi: Fix division by zero



[ Upstream commit 3588b1c0 ]

When there is no dummy cycle in the spi-nor commands, both dummy bus cycle
bytes and width are zero. Because of the cpu's warning when divided by
zero, the warning should be avoided. Return just zero to avoid such
calculations.

Fixes: 1b74dd64 ("spi: Add Socionext F_OSPI SPI flash controller driver")
Co-developed-by: default avatarKohei Ito <ito.kohei@socionext.com>
Signed-off-by: default avatarKohei Ito <ito.kohei@socionext.com>
Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://patch.msgid.link/20250206085747.3834148-1-hayashi.kunihiko@socionext.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f3ce0528
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment