]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mei: amthif: drop parameter validation from mei_amthif_write
authorTomas Winkler <tomas.winkler@intel.com>
Sun, 7 Feb 2016 21:35:27 +0000 (23:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 22:47:20 +0000 (14:47 -0800)
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>
drivers/misc/mei/amthif.c

index 058dd6917805024d259e4ea17c4845e48a8f42cb..911b663a8fdbb145bd80185c68a8a4b8a14b5b00 100644 (file)
@@ -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);