summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/timer.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-06-30 14:00:16 +0200
committerPaul Walmsley <paul@pwsan.com>2015-07-16 07:59:39 +0200
commit9a0cb98589037c0ccb6210f5fd827445b3710c5e (patch)
tree4971c939bc06ebcf7473fb4b113f6074ce7c93f8 /arch/arm/mach-omap2/timer.c
parentARM: OMAP2+: sparse: add missing function declarations (diff)
downloadlinux-9a0cb98589037c0ccb6210f5fd827445b3710c5e.tar.xz
linux-9a0cb98589037c0ccb6210f5fd827445b3710c5e.zip
ARM: OMAP2: Delete an unnecessary check
The of_node_put() function tests whether its argument is NULL and then returns immediately if so. Furthermore, the kerneldoc for of_node_put() explicitly supports passing in a NULL pointer as its argument. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> [paul@pwsan.com: dropped the omap_device.c and omap_hwmod.c changes for now, edited the commit message accordingly and to note the documented "contract"] Reviewed-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/timer.c')
-rw-r--r--arch/arm/mach-omap2/timer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index cac46d852da1..154482216624 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -208,8 +208,7 @@ static void __init omap_dmtimer_init(void)
/* If we are a secure device, remove any secure timer nodes */
if ((omap_type() != OMAP2_DEVICE_TYPE_GP)) {
np = omap_get_timer_dt(omap_timer_match, "ti,timer-secure");
- if (np)
- of_node_put(np);
+ of_node_put(np);
}
}