mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
5ffa828534
The intent here was to return negative error codes but it actually
returns positive values. The problem is that type promotion with
ternary operations is quite complicated.
"ret" is an int. "copied" is a u32. And the snoop_file_read() function
returns long. What happens is that "ret" is cast to u32 and becomes
positive then it's cast to long and it's still positive.
Fix this by removing the ternary so that "ret" is type promoted directly
to long.
Fixes:
|
||
---|---|---|
.. | ||
aspeed-lpc-ctrl.c | ||
aspeed-lpc-snoop.c | ||
aspeed-p2a-ctrl.c | ||
aspeed-socinfo.c | ||
Kconfig | ||
Makefile |