forked from luck/tmp_suning_uos_patched
8e81ff6d51
[ Upstream commit 5ffa828534036348fa90fb3079ccc0972d202c4a ]
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 | ||
Kconfig | ||
Makefile |