linux/drivers/soc
Dan Carpenter 5ffa828534 soc: aspeed: fix a ternary sign expansion bug
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>
2021-04-23 11:16:47 +02:00
..
actions
amlogic
aspeed soc: aspeed: fix a ternary sign expansion bug 2021-04-23 11:16:47 +02:00
atmel drivers: soc: atmel: fix type for same7 2021-02-04 21:54:31 +01:00
bcm This pull request contains Broadcom ARM/ARM64/MIPS based SoCs drivers 2021-04-01 21:07:46 +02:00
canaan clk: Add RISC-V Canaan Kendryte K210 clock driver 2021-02-22 17:51:04 -08:00
dove
fsl soc: fsl: enable acpi support in RCPM driver 2021-04-08 16:34:15 -05:00
gemini
imx soc: imx: add i.MX51/i.MX53 unique id support 2021-03-15 12:21:48 +08:00
ixp4xx
lantiq
litex OpenRISC updates for 5.12 2021-02-26 14:16:06 -08:00
mediatek soc: mediatek: mmsys: Add support for MT8167 SoC 2021-04-06 12:57:10 +02:00
qcom soc: qcom: mdt_loader: Detect truncated read of segments 2021-04-08 10:28:59 -05:00
renesas soc: renesas: rmobile-sysc: Mark fwnode when PM domain is added 2021-03-08 10:25:00 +01:00
rockchip
samsung soc: samsung: pm_domains: Convert to regular platform driver 2021-01-15 20:50:34 +01:00
sifive
sunxi ARM: SoC drivers for v5.12 2021-02-20 18:42:28 -08:00
tegra soc/tegra: pmc: Print out domain name when reset fails to acquire 2021-03-26 13:10:25 +01:00
ti soc: ti: omap-prm: Allow hardware supported retention when idle 2021-03-10 13:59:17 +02:00
ux500
versatile
xilinx clk: xilinx: move xlnx_vcu clock driver from soc 2021-02-08 18:31:25 -08:00
Kconfig RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
Makefile RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00