]> git.baikalelectronics.ru Git - kernel.git/commit
platform/chrome: cros_ec_proto: drop BUG_ON() in cros_ec_prepare_tx()
authorTzung-Bi Shih <tzungbi@kernel.org>
Fri, 13 May 2022 04:41:39 +0000 (12:41 +0800)
committerTzung-Bi Shih <tzungbi@kernel.org>
Mon, 16 May 2022 02:01:51 +0000 (10:01 +0800)
commita1f1b6d9ae5b74e797d010b052bfd63cd4da382c
tree253e28cb483fe1b1977ddc27c5381a1728de3119
parent5c8c6f1ae9deaef3c99714982f760bb207c7657f
platform/chrome: cros_ec_proto: drop BUG_ON() in cros_ec_prepare_tx()

It is overkill to crash the kernel if the given message is oversize.

Drop the BUG_ON() and return -EINVAL instead.

Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20220513044143.1045728-4-tzungbi@kernel.org
drivers/platform/chrome/cros_ec_proto.c