]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers-iommu-msm_iommu_devc-fix-leak-and-clean-up-error-paths-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 19 Jun 2013 00:05:31 +0000 (10:05 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:12:44 +0000 (17:12 +1000)
remove now-unneeded initialization of ctx_drvdata, remove unneeded braces

Cc: David Brown <davidb@codeaurora.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Libo Chen <clbchenlibo.chen@huawei.com>
Cc: Libo Chen <libo.chen@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/iommu/msm_iommu_dev.c

index 63cdeb903d5c00a22e5fe0d4ac056257438d1985..6ba3514771322a387d864582e326a947361f655f 100644 (file)
@@ -291,22 +291,19 @@ static int msm_iommu_ctx_probe(struct platform_device *pdev)
 {
        struct msm_iommu_ctx_dev *c = pdev->dev.platform_data;
        struct msm_iommu_drvdata *drvdata;
-       struct msm_iommu_ctx_drvdata *ctx_drvdata = NULL;
+       struct msm_iommu_ctx_drvdata *ctx_drvdata;
        int i, ret;
-       if (!c || !pdev->dev.parent) {
+
+       if (!c || !pdev->dev.parent)
                return -EINVAL;
-       }
 
        drvdata = dev_get_drvdata(pdev->dev.parent);
-
-       if (!drvdata) {
+       if (!drvdata)
                return -ENODEV;
-       }
 
        ctx_drvdata = kzalloc(sizeof(*ctx_drvdata), GFP_KERNEL);
-       if (!ctx_drvdata) {
+       if (!ctx_drvdata)
                return -ENOMEM;
-       }
 
        ctx_drvdata->num = c->num;
        ctx_drvdata->pdev = pdev;