From eb0859789eaf1d19a9c44747d6e703a45e01d7ba Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Wed, 27 Mar 2013 10:25:47 +1100 Subject: [PATCH] drivers/rtc/rtc-max8907.c: remove redundant code Remove unnecessary goto statements to simplify the code. devm_request_threaded_irq returns 0 upon success, hence explicit return 0 is not necessary. Signed-off-by: Sachin Kamat Cc: Chiwoong Byun Cc: Jonghwa Lee Cc: Laxman dewangan Cc: Venu Byravarasu Cc: Jingoo Han Signed-off-by: Andrew Morton --- drivers/rtc/rtc-max8907.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/rtc/rtc-max8907.c b/drivers/rtc/rtc-max8907.c index 9d62cdb83d11..86afb797125d 100644 --- a/drivers/rtc/rtc-max8907.c +++ b/drivers/rtc/rtc-max8907.c @@ -200,23 +200,16 @@ static int max8907_rtc_probe(struct platform_device *pdev) rtc->irq = regmap_irq_get_virq(max8907->irqc_rtc, MAX8907_IRQ_RTC_ALARM0); - if (rtc->irq < 0) { - ret = rtc->irq; - goto err_unregister; - } + if (rtc->irq < 0) + return rtc->irq; ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL, max8907_irq_handler, IRQF_ONESHOT, "max8907-alarm0", rtc); - if (ret < 0) { + if (ret < 0) dev_err(&pdev->dev, "Failed to request IRQ%d: %d\n", rtc->irq, ret); - goto err_unregister; - } - - return 0; -err_unregister: return ret; } -- 2.39.5