summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2015-09-21 11:45:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-04 12:19:23 +0100
commit84dfe03ae2112b817d5221575d59ba616dc0c3e2 (patch)
tree219bb1a508bb9792f94610d64d048451fbc14f5b /drivers/misc
parentfb727077b04f768d0c79d9aa29e958262a9e3d9e (diff)
downloadblackbird-op-linux-84dfe03ae2112b817d5221575d59ba616dc0c3e2.tar.gz
blackbird-op-linux-84dfe03ae2112b817d5221575d59ba616dc0c3e2.zip
mei: hbm: fix error in state check logic
Use || instead && in state check. The latter is bogus and leads to following warning: drivers/misc/mei/hbm.c:1212:46: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op] Fixes: 70ef835c84b3 ("mei: support for dynamic clients") Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/hbm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c
index 8eec887c8f70..6d7c188fb65c 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -1209,7 +1209,7 @@ int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr)
* after the host receives the enum_resp
* message clients may be added or removed
*/
- if (dev->hbm_state <= MEI_HBM_ENUM_CLIENTS &&
+ if (dev->hbm_state <= MEI_HBM_ENUM_CLIENTS ||
dev->hbm_state >= MEI_HBM_STOPPED) {
dev_err(dev->dev, "hbm: add client: state mismatch, [%d, %d]\n",
dev->dev_state, dev->hbm_state);
OpenPOWER on IntegriCloud