linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: max77686: Remove some dead code
@ 2021-05-08  5:43 Christophe JAILLET
  2021-05-08 14:38 ` Edmundo Carmona Antoranz
  2021-05-10 12:18 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 12+ messages in thread
From: Christophe JAILLET @ 2021-05-08  5:43 UTC (permalink / raw)
  To: cw00.choi, krzysztof.kozlowski, b.zolnierkie, a.zummo, alexandre.belloni
  Cc: linux-rtc, linux-kernel, kernel-janitors, Christophe JAILLET

'ret' is known to be an error pointer here, so it can't be 0.
Remove this dead code.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/rtc/rtc-max77686.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index d51cc12114cb..ce089ed934ad 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -764,8 +764,6 @@ static int max77686_rtc_probe(struct platform_device *pdev)
 	if (IS_ERR(info->rtc_dev)) {
 		ret = PTR_ERR(info->rtc_dev);
 		dev_err(&pdev->dev, "Failed to register RTC device: %d\n", ret);
-		if (ret == 0)
-			ret = -EINVAL;
 		goto err_rtc;
 	}
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-05-12 22:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08  5:43 [PATCH] rtc: max77686: Remove some dead code Christophe JAILLET
2021-05-08 14:38 ` Edmundo Carmona Antoranz
2021-05-08 16:59   ` Christophe JAILLET
2021-05-09  0:06     ` Edmundo Carmona Antoranz
2021-05-09 21:06       ` Alexandre Belloni
2021-05-10 12:20         ` Krzysztof Kozlowski
2021-05-12 16:13           ` Alexandre Belloni
2021-05-12 16:24             ` Krzysztof Kozlowski
2021-05-12 16:54               ` Alexandre Belloni
2021-05-12 20:02             ` Christophe JAILLET
2021-05-12 21:22               ` Alexandre Belloni
2021-05-10 12:18 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).