mei: mei_write: revamp error path handling
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 9 Oct 2012 14:50:18 +0000 (16:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Oct 2012 22:35:03 +0000 (15:35 -0700)
commit75f0ee1559c5d51948e029041a9b722b3e3f0b83
tree25c504ed1cca8a64d1c1b07774a617a0e3adcd4c
parent33d28c9205257479be540a31b03339817cf2d62c
mei: mei_write: revamp error path handling

1. unify common amt and regular error path and use it early in the
  function
2. fix indentation
3. propagate error code directly from copy_from_user
4. print out errors using dev_err instead of dev_dbg

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