Remove unnecessary check in drivers/rtc/rtc-v3020.c
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)
Signed-off-by Eric Sesterhenn <[email protected]>
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_devif (pdev->resource[0 ].flags !=IORESOURCE_MEM )return -EBUSY ; -if (pdev ==NULL ) -return -EBUSY ; - chip =kzalloc (sizeof *chip,GFP_KERNEL );if (!chip)return -ENOMEM ;