Skip to contentSkip to conversation

Remove unnecessary check in drivers/rtc/rtc-v3020.c

PATCH New Eric Sesterhenn 1 participant 1 message Sep 27, 2006 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

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

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)

drivers/rtc/rtc-v3020.c renamed from drivers/rtc/rtc-v3020.c.orig +0 -3
@@ -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;