[PATCH] Remove unnecessary check in drivers/rtc/rtc-v3020.c
authorEric Sesterhenn <snakebyte@gmx.de>
Sun, 1 Oct 2006 06:28:09 +0000 (23:28 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 1 Oct 2006 07:39:24 +0000 (00:39 -0700)
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>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Raphael Assenat <raph@raphnet.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/rtc/rtc-v3020.c

index a40f400acff6b814401228ba550f54e92aeddfda..e28cc4b0901ace9f0405983f757480ec9135cae1 100644 (file)
@@ -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;