mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-13 07:31:07 +00:00
wifi: mm81x: fix type bugs handling sdio_readl/writel()
The sdio_readl() and sdio_writel() functions, instead of returning kernel
error codes, instead stores the error codes in a parameter. These caller
functions pass should pass an int pointer to store the error code but
instead pass a signed long.
This will not work on big endian systems. On little endian systems
passing a ssize_t means negative error codes are converted to positive
values near UINT_MAX. This doesn't cause a problem at runtime because
in mm81x_sdio_reg32_write() the error codes are discarded and we always
return -EIO. In mm81x_sdio_reg32_read() the high bits are truncated
away so the positive value is re-converted back to negative and the
code works as intended.
Either way, passing an int is the correct thing and is a cleanup.
Fixes: b1906cea00 ("wifi: mm81x: add mm81x Wi-Fi HaLow driver")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/aoa7Hj1W7ETOrOzO@stanley.mountain
Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
This commit is contained in:
parent
0f5a5d9290
commit
37f0188099
1 changed files with 4 additions and 5 deletions
Loading…
Add table
Add a link
Reference in a new issue