linux/drivers/platform
Tzung-Bi Shih ddec8e9e90 platform/chrome: cros_ec_spi: drop unneeded BUG_ON()
In the context, the following conditions are always false:

- `todo` < 0
Suppose that EC_SPI_FRAME_START is found at the last byte of transfer.

In the case, `ptr` == `end` - 1.  As a result, `todo` must be 0.

- `todo` > `ec_dev->din_size`
Suppose that there is no preamble bytes.  EC_SPI_FRAME_START is found at
the first byte of transfer.

In the case, `end` == `ptr` + EC_MSG_PREAMBLE_COUNT.
As a result, `todo` == EC_MSG_PREAMBLE_COUNT - 1.
However, it already checked `ec_dev->din_size` < EC_MSG_PREAMBLE_COUNT at
the beginning of function.

Drop the unneeded BUG_ON().

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220513044143.1045728-7-tzungbi@kernel.org
2022-05-16 10:01:51 +08:00
..
chrome platform/chrome: cros_ec_spi: drop unneeded BUG_ON() 2022-05-16 10:01:51 +08:00
goldfish platform: goldfish: pipe: Use platform_get_irq() to get the interrupt 2022-03-18 13:55:21 +01:00
mellanox platform/mellanox: mlxbf-pmc: Fix an IS_ERR() vs NULL bug in mlxbf_pmc_map_counters 2021-12-21 19:35:22 +01:00
mips MIPS: Loongson64: Add missing of_node_put() in ls2k_reset_init() 2022-01-05 09:53:45 +01:00
olpc spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
surface platform/surface: Remove Surface 3 Button driver 2022-03-02 12:33:00 +01:00
x86 platform-drivers-x86 for v5.18-1 2022-03-25 12:14:39 -07:00
Kconfig platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00
Makefile platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00