summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2014-04-07 12:21:22 +0530
committerBharat Nihalani <bnihalani@nvidia.com>2014-04-09 21:32:46 -0700
commita168222d4a85a927528e19ec6324cee1385e4d3b (patch)
tree6393dc731689088270c4c11dc17cbcaaed4b1362 /security
parentae19265e71df6e7aacd157b7d012c8833ee7e060 (diff)
security: tlk: abort driver init if dev->req_param_buf is NULL
During driver init, we allocate memory for dev->req_param_buf if the secure firmware supports the new way of accessing request params. We need to check that dev->req_param_buf was allocated before using it. Change-Id: I796255274937f46fe01aeb1f5372c23bae830b85 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/393218 GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'security')
-rw-r--r--security/tlk_driver/ote_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/tlk_driver/ote_device.c b/security/tlk_driver/ote_device.c
index bfc59d3cb94c..d7dfd7a94d6f 100644
--- a/security/tlk_driver/ote_device.c
+++ b/security/tlk_driver/ote_device.c
@@ -76,7 +76,7 @@ static int te_create_free_cmd_list(struct tlk_device *dev)
&dev->param_addr_phys, GFP_KERNEL);
}
- if ((dev->req_addr == NULL) || (dev->param_addr == NULL)) {
+ if (!dev->req_addr || !dev->param_addr || !dev->req_param_buf) {
ret = -ENOMEM;
goto error;
}