summaryrefslogtreecommitdiff
path: root/drivers/misc/mei
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2016-02-07 23:35:27 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-07 14:47:20 -0800
commit77b007b1b50ef728be8252cbdf3f7e7e45b29bc5 (patch)
tree51e1c20eef024ffba54312443628dfdd13f59a72 /drivers/misc/mei
parent9abd8b31292497530085156b41746e2a1cd9c934 (diff)
mei: amthif: drop parameter validation from mei_amthif_write
Remove duplicated parameter validation from mei_amthif_write functions, The parameter check is already performed by the caller function mei_write Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r--drivers/misc/mei/amthif.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c
index 058dd6917805..911b663a8fdb 100644
--- a/drivers/misc/mei/amthif.c
+++ b/drivers/misc/mei/amthif.c
@@ -285,15 +285,7 @@ int mei_amthif_run_next_cmd(struct mei_device *dev)
int mei_amthif_write(struct mei_cl *cl, struct mei_cl_cb *cb)
{
- struct mei_device *dev;
-
- if (WARN_ON(!cl || !cl->dev))
- return -ENODEV;
-
- if (WARN_ON(!cb))
- return -EINVAL;
-
- dev = cl->dev;
+ struct mei_device *dev = cl->dev;
list_add_tail(&cb->list, &dev->amthif_cmd_list.list);