提交 397d6140 编写于 作者: E Eric Sesterhenn 提交者: Linus Torvalds

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

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: NEric Sesterhenn <snakebyte@gmx.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Raphael Assenat <raph@raphnet.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 3a271111
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册