summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2015-11-19 03:56:15 -0500
committerSachin Nikam <snikam@nvidia.com>2015-11-25 03:45:58 -0500
commit10f6da09eb6fffea2d50c8fe4634e0d5f8226d7d (patch)
tree4141867911601aed374dba50b031cb5aa5d9e9d3 /drivers/gpu/nvgpu/gk20a/gk20a.c
parent836027806dab4a59c0faadca4f530371ef5869d0 (diff)
gpu: nvgpu: fix Coverity issues
- operands not affecting result (id = 12845) - logically dead code (id = 12890) - dereference after null check (id = 12968) - unsigned compared to 0 (id = 13176) - resource leak (id = 13338, 18673) - unused pointer value (id = 13916) Bug 1703084 Change-Id: I2f401dd93126af27748c53fa1b3a59cb154af36b Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/835143 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 7ac600c0..79218c97 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -1102,7 +1102,7 @@ static int gk20a_pm_enable_clk(struct device *dev)
1102 for (index = 0; index < platform->num_clks; index++) { 1102 for (index = 0; index < platform->num_clks; index++) {
1103 int err = 0; 1103 int err = 0;
1104 if (platform->clk[index]) 1104 if (platform->clk[index])
1105 clk_prepare_enable(platform->clk[index]); 1105 err = clk_prepare_enable(platform->clk[index]);
1106 if (err) 1106 if (err)
1107 return -EINVAL; 1107 return -EINVAL;
1108 } 1108 }
@@ -1623,14 +1623,12 @@ static int gk20a_domain_init(struct of_device_id *matches)
1623{ 1623{
1624 int ret = 0; 1624 int ret = 0;
1625 struct device_node *np; 1625 struct device_node *np;
1626 const struct of_device_id *match;
1627 struct gk20a_domain_data *gk20a_domain; 1626 struct gk20a_domain_data *gk20a_domain;
1628 1627
1629 np = of_find_matching_node(NULL, matches); 1628 np = of_find_matching_node(NULL, matches);
1630 if (!np) 1629 if (!np)
1631 return -ENOENT; 1630 return -ENOENT;
1632 1631
1633 match = of_match_node(matches, np);
1634 gk20a_domain = (struct gk20a_domain_data *)kzalloc 1632 gk20a_domain = (struct gk20a_domain_data *)kzalloc
1635 (sizeof(struct gk20a_domain_data), GFP_KERNEL); 1633 (sizeof(struct gk20a_domain_data), GFP_KERNEL);
1636 if (!gk20a_domain) 1634 if (!gk20a_domain)