Skip to content

Commit

Permalink
[PATCH] Remove unnecessary check in drivers/rtc/rtc-v3020.c
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
SesterhennEric authored and Linus Torvalds committed Oct 1, 2006
1 parent 3a27111 commit 397d614
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/rtc/rtc-v3020.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 397d614

Please sign in to comment.