提交 ad819039 编写于 作者: S Sachin Kamat 提交者: Linus Torvalds

drivers/rtc/rtc-max77686.c: fix incorrect return value on error

'ret' was not initialized to error code before returning. While
at it also remove some redundant code and cleanup.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Cc: Chiwoong Byun <woong.byun@samsung.com>
Cc: Jonghwa Lee <jonghwa3.lee@samsung.com>
Cc: Laxman dewangan <ldewangan@nvidia.com>
Cc: Venu Byravarasu <vbyravarasu@nvidia.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 406dc004
......@@ -551,17 +551,17 @@ static int max77686_rtc_probe(struct platform_device *pdev)
goto err_rtc;
}
virq = irq_create_mapping(max77686->irq_domain, MAX77686_RTCIRQ_RTCA1);
if (!virq)
if (!virq) {
ret = -ENXIO;
goto err_rtc;
}
info->virq = virq;
ret = devm_request_threaded_irq(&pdev->dev, virq, NULL,
max77686_rtc_alarm_irq, 0, "rtc-alarm0", info);
if (ret < 0) {
if (ret < 0)
dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n",
info->virq, ret);
goto err_rtc;
}
err_rtc:
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册