crypto: tegra-se: fix resourse leak
Salona Sinha [Wed, 15 Jan 2014 12:44:50 +0000 (17:44 +0530)]
Coverity id : 25364

Bug 1416640

Change-Id: I6cbdc67004f94f2afbc4c8b656631f4d4a0ce8c5
Signed-off-by: Salona Sinha <salonas@nvidia.com>
Reviewed-on: http://git-master/r/356025
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

drivers/crypto/tegra-se.c

index 398d7d2..337dd13 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Support for Tegra Security Engine hardware crypto algorithms.
  *
- * Copyright (c) 2011-2013, NVIDIA Corporation. All Rights Reserved.
+ * Copyright (c) 2011-2014, NVIDIA Corporation. All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -2609,6 +2609,7 @@ static int tegra_se_probe(struct platform_device *pdev)
                                &pdev->dev);
                if (!match) {
                        dev_err(&pdev->dev, "Error: No device match found\n");
+                       kfree(se_dev);
                        return -ENODEV;
                }
                se_dev->chipdata = (struct tegra_se_chipdata *)match->data;