summaryrefslogtreecommitdiff
path: root/drivers/staging/ccree
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-07-09 00:43:37 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-16 08:40:57 +0200
commit60ba7c7c26b8df3688a952cf4bcfbc8dcdafdb9b (patch)
treedf29908372c5f77b3c3dacfd20e89779fd284b42 /drivers/staging/ccree
parentf7d0879f10080d52b1af383f049b880c78e4fa82 (diff)
staging: ccree: remove unnecessary cast on kmalloc
The assignment operator implicitly converts a void pointer to the type of the pointer it is assigned to. This issue was detected using Coccinelle and the following semantic patch: @@ expression * e; expression arg1, arg2; type T; @@ - e=(T*) + e= kmalloc(arg1, arg2); Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ccree')
-rw-r--r--drivers/staging/ccree/ssi_buffer_mgr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c
index b35871eeabd1..18a86942134c 100644
--- a/drivers/staging/ccree/ssi_buffer_mgr.c
+++ b/drivers/staging/ccree/ssi_buffer_mgr.c
@@ -1725,8 +1725,7 @@ int ssi_buffer_mgr_init(struct ssi_drvdata *drvdata)
struct buff_mgr_handle *buff_mgr_handle;
struct device *dev = &drvdata->plat_dev->dev;
- buff_mgr_handle = (struct buff_mgr_handle *)
- kmalloc(sizeof(struct buff_mgr_handle), GFP_KERNEL);
+ buff_mgr_handle = kmalloc(sizeof(struct buff_mgr_handle), GFP_KERNEL);
if (!buff_mgr_handle)
return -ENOMEM;