projects/linux·commit 397d6140

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

397d6140 · Eric Sesterhenn <[email protected]> · 2006-09-30 23:28:09 -07:00

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 <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Raphael Assenat <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
397d6140e93156ecb9cafcd9be0db10ff3c12ab3
Parents
3a271111

Changes

1 files changed · +0 −3

FileStatusAddDelContent
drivers/rtc/rtc-v3020.cmodified+0−3View file

drivers/rtc/rtc-v3020.c

View file
diff --git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c
index a40f400..e28cc4b 100644
--- a/drivers/rtc/rtc-v3020.c
+++ b/drivers/rtc/rtc-v3020.c
@@ -169,9 +169,6 @@ static int rtc_probe(struct platform_device *pdev)
if (pdev->resource[0].flags != IORESOURCE_MEM)
return -EBUSY;
- if (pdev == NULL)
- return -EBUSY;
-
chip = kzalloc(sizeof *chip, GFP_KERNEL);
if (!chip)
return -ENOMEM;