mei: fix out of array access to me clients array
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 7 May 2013 18:12:31 +0000 (21:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2013 17:07:54 +0000 (10:07 -0700)
commit80fe6361540fd7e0a38326b02b4f2a5e68c99d0a
tree975befccae8d0e395cc96c1ed92a60aaa56e6ab5
parent6220d6a05089220d913701416ab9423af23cd1bb
mei: fix out of array access to me clients array

The patch 9f81abdac362: "mei: implement mei_cl_connect function"
from Jan 8, 2013, leads to the following static checker warning:
"drivers/misc/mei/main.c:522 mei_ioctl_connect_client()
 warn: check 'dev->me_clients[]' for negative offsets (-2)"

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/main.c