The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [Patch] Remove unnecessary check in drivers/rtc/rtc-v3020.c
@ 2006-09-27 22:49 Eric Sesterhenn
  0 siblings, 0 replies; only message in thread
From: Eric Sesterhenn @ 2006-09-27 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: a.zummo

hi,

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: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.18-git7/drivers/rtc/rtc-v3020.c.orig	2006-09-27 22:18:37.000000000 +0200
+++ linux-2.6.18-git7/drivers/rtc/rtc-v3020.c	2006-09-27 22:18:50.000000000 +0200
@@ -169,9 +169,6 @@ static int rtc_probe(struct platform_dev
 	if (pdev->resource[0].flags != IORESOURCE_MEM)
 		return -EBUSY;
 
-	if (pdev == NULL)
-		return -EBUSY;
-
 	chip = kzalloc(sizeof *chip, GFP_KERNEL);
 	if (!chip)
 		return -ENOMEM;



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-27 22:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-27 22:49 [Patch] Remove unnecessary check in drivers/rtc/rtc-v3020.c Eric Sesterhenn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox