Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 397d6140 authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Linus Torvalds
Browse files

[PATCH] Remove unnecessary check in drivers/rtc/rtc-v3020.c



Looks like the probe function always gets a valid pdev, and checking it
after dereferencing it is pretty useless.  This patch removes the check
(cid #1365)

Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Raphael Assenat <raph@raphnet.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3a271111
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -169,9 +169,6 @@ static int rtc_probe(struct platform_device *pdev)
	if (pdev->resource[0].flags != IORESOURCE_MEM)
	if (pdev->resource[0].flags != IORESOURCE_MEM)
		return -EBUSY;
		return -EBUSY;


	if (pdev == NULL)
		return -EBUSY;

	chip = kzalloc(sizeof *chip, GFP_KERNEL);
	chip = kzalloc(sizeof *chip, GFP_KERNEL);
	if (!chip)
	if (!chip)
		return -ENOMEM;
		return -ENOMEM;