arm: tegra12: clock: fix Coverity Null dereference issue
Kaz Fukuoka [Wed, 28 Aug 2013 01:06:08 +0000 (18:06 -0700)]
remove unnecessary null check
Coverity id : 22172

Bug 1046331

Change-Id: I76e4a25e9e913b3003589e4c0b7525e7ecc57e34
Signed-off-by: Kaz Fukuoka <kfukuoka@nvidia.com>
Reviewed-on: http://git-master/r/267574
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

arch/arm/mach-tegra/tegra12_clocks.c

index 38df7f7..f35dc40 100644 (file)
@@ -5460,7 +5460,7 @@ static int tegra_clk_shared_bus_user_set_parent(struct clk *c, struct clk *p)
 
        tegra_clk_shared_bus_update(c->parent);
 
-       if (c->refcnt && c->parent)
+       if (c->refcnt)
                clk_disable(c->parent);
 
        clk_reparent(c, p);