android_kernel_motorola_sm6375/drivers/soc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dan Carpenter 6b121dc680 soc: aspeed: fix a ternary sign expansion bug
[ 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: 3772e5da44 ("drivers/misc: Aspeed LPC snoop output using misc chardev")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
Reviewed-by: Patrick Venture <[email protected]>
Link: https://lore.kernel.org/r/YIE90PSXsMTa2Y8n@mwanda
Link: https://lore.kernel.org/r/[email protected]'
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2021-05-14 09:44:23 +02:00
..
actions
amlogic soc: amlogic: canvas: add missing put_device() call in meson_canvas_get() 2020-12-30 11:51:15 +01:00
aspeed soc: aspeed: fix a ternary sign expansion bug 2021-05-14 09:44:23 +02:00
atmel drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[] 2021-02-03 23:25:57 +01:00
bcm
dove
fsl soc/fsl: qbman: fix conflicting alignment attributes 2021-04-14 08:24:16 +02:00
gemini
imx
ixp4xx
lantiq
mediatek
qcom soc: qcom: mdt_loader: Detect truncated read of segments 2021-05-14 09:44:20 +02:00
renesas
rockchip
samsung
sunxi
tegra
ti drivers: soc: ti: knav_qmss_queue: Fix error return code in knav_queue_probe 2020-12-30 11:51:10 +01:00
ux500
versatile
xilinx
zte
Kconfig
Makefile