OSDN Git Service

mei: simplify mei_open error handling
authorTomas Winkler <tomas.winkler@intel.com>
Mon, 16 Sep 2013 20:44:46 +0000 (23:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Oct 2013 23:00:52 +0000 (16:00 -0700)
commite036cc5727eb6d471442d2a9218990aa11215400
tree0eb7788e41d4631828374da6320fadd85fa1b93a
parentd7173493683853047d6efc8d4454c70469a7b033
mei: simplify mei_open error handling

1. Perform simple checks first and only then attempt to allocate cl structure.
2. Remove open_handler_count test, this is already checked in mei_cl_link function
3. return -EMFILE instead of -ENOENT as expected by user space

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/client.c
drivers/misc/mei/main.c