linux_dsm_epyc7002/drivers/soc
Dan Carpenter 8e81ff6d51 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 <dan.carpenter@oracle.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Patrick Venture <venture@google.com>
Link: https://lore.kernel.org/r/YIE90PSXsMTa2Y8n@mwanda
Link: https://lore.kernel.org/r/20210423000919.1249474-1-joel@jms.id.au'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:50:21 +02:00
..
actions soc: actions: include header to fix missing prototype 2020-09-22 12:45:16 +05:30
amlogic soc: amlogic: canvas: add missing put_device() call in meson_canvas_get() 2020-12-30 11:53:27 +01:00
aspeed soc: aspeed: fix a ternary sign expansion bug 2021-05-14 09:50:21 +02:00
atmel drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[] 2021-02-03 23:28:40 +01:00
bcm soc: bcm: brcmstb: biuctrl: Change RAC data line prefetching after 4 consecutive lines 2020-09-06 12:43:02 -07:00
dove treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
fsl soc/fsl: qbman: fix conflicting alignment attributes 2021-04-14 08:42:09 +02:00
gemini
imx ARM: imx: fix imx8m dependencies 2021-02-03 23:28:45 +01:00
ixp4xx soc: ixp4xx: Protect IXP4xx SoC drivers by ARCH_IXP4XX || COMPILE_TEST 2019-08-29 17:34:38 +02:00
kendryte riscv: K210: Add a built-in device tree 2020-05-18 11:38:06 -07:00
lantiq soc: lantiq: convert to devm_platform_ioremap_resource 2020-01-10 11:44:52 -08:00
mediatek soc: mediatek: Check if power domains can be powered on at boot time 2020-12-30 11:52:56 +01:00
qcom soc: qcom: mdt_loader: Detect truncated read of segments 2021-05-14 09:50:16 +02:00
renesas soc: renesas: rmobile-sysc: Fix some leaks in rmobile_init_pm_domains() 2020-12-30 11:52:56 +01:00
rockchip soc: rockchip: io-domain: Fix error return code in rockchip_iodomain_probe() 2020-12-30 11:53:34 +01:00
samsung soc: samsung: exynos-asv: handle reading revision register error 2021-03-04 11:38:32 +01:00
sifive soc: sifive: l2 cache: Mark l2_get_priv_group as static 2020-05-28 15:57:49 -07:00
sunxi soc: sunxi: sram: remove unneeded semicolon 2020-09-11 17:02:39 +02:00
tegra soc/tegra: regulators: Fix locking up when voltage-spread is out of range 2021-05-14 09:49:58 +02:00
ti soc: ti: omap-prm: Fix occasional abort on reset deassert for dra7 iva 2021-03-30 14:31:56 +02:00
ux500 soc: ux500: Use custom soc attribute group instead of device_create_file 2020-07-06 09:48:06 +01:00
versatile soc: integrator: Drop pointless static qualifier in integrator_soc_init() 2020-08-20 08:57:05 +02:00
xilinx soc: xilinx: Fix error code in zynqmp_pm_probe() 2020-06-18 10:07:17 +02:00
zte treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
Kconfig riscv: Add Kendryte K210 SoC support 2020-04-03 10:49:52 -07:00
Makefile RISC-V Patches for the 5.7 Merge Window, Part 1 2020-04-09 10:51:30 -07:00