Skip to content
Verified Commit 3588b1c0 authored by Kunihiko Hayashi's avatar Kunihiko Hayashi Committed by Mark Brown
Browse files

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



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: Kunihiko Hayashi's 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>
parent aff2355d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment