diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2018-11-06 12:04:38 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-07 13:53:03 +0100 |
commit | 40a669739ac76e9076331397ed23592a8d66fb28 (patch) | |
tree | a4c40222dc06a03749b85feb0f46c0548ceb033c /drivers/misc/mei | |
parent | 651022382c7f8da46cb4872a545ee1da6d097d2a (diff) | |
download | blackbird-op-linux-40a669739ac76e9076331397ed23592a8d66fb28.tar.gz blackbird-op-linux-40a669739ac76e9076331397ed23592a8d66fb28.zip |
mei: hbm: drop BUG() from the hbm handler
Drop BUG() from the hbm handler in order not to crash the whole
kernel on faulty firmware implementation. Instead of it, just return
an error resulting into link reset.
There is no any known issue of faulty firmware in this matter,
the change is just to ease the development.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r-- | drivers/misc/mei/hbm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c index e56f3e72d57a..fe67381b34c3 100644 --- a/drivers/misc/mei/hbm.c +++ b/drivers/misc/mei/hbm.c @@ -1271,8 +1271,8 @@ int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr) break; default: - BUG(); - break; + WARN(1, "hbm: wrong command %d\n", mei_msg->hbm_cmd); + return -EPROTO; } return 0; |