aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorVirupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>2010-05-27 14:17:09 +0530
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:45:29 -0600
commit6c06c7a5113a857c920361ab800e26aee67485f9 (patch)
treee129e4ff3e35930f13038ba201d7ae09a41b9b6f /arch
parent6287a02e7f8838273114e968e2f4c1a858f15f90 (diff)
downloadlinux-2.6.34-ux500-6c06c7a5113a857c920361ab800e26aee67485f9.tar.gz
mach-ux500: fix coverity issue in clock.c
mach-ux500: Fix the coverity issue in the clock.c file related to the NULL pointer dereference. ST-Ericsson ID: ER262144 Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/484 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Tested-by: Jonas ABERG <jonas.aberg@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Change-Id: I51a2475990d35813be5de1b7b7ec756e2428669c Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2375
Diffstat (limited to 'arch')
-rwxr-xr-xarch/arm/mach-ux500/clock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index 6be3833e798..66e3e98259a 100755
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -864,7 +864,8 @@ int clk_set_parent(struct clk *clk, struct clk *new_parent)
} else if ((clk->parent_cluster == NULL) && (clk->parent_periph == NULL)) {
/* Clk itself is a PRCMU clk */
prcmu_clk = (struct clk *) clk;
- }
+ } else
+ return -EINVAL;
/* Holding the lock so that val register is not modified in between */
/* NOTE : Dont use printk() further in the code untill the lock is held */