mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
drivers/rtc/rtc-max8997.c: fix incorrect return value on error
'ret' was being returned without initializing it to error code. While at it also remove duplicate return statement. Signed-off-by: Sachin Kamat <[email protected]> Cc: Jonghwa Lee <[email protected]> Cc: Chiwoong Byun <[email protected]> Cc: Laxman dewangan <[email protected]> Cc: Venu Byravarasu <[email protected]> Cc: Jingoo Han <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dbda161be8
commit
406dc00407
1 changed files with 2 additions and 5 deletions
|
|
@ -491,6 +491,7 @@ static int max8997_rtc_probe(struct platform_device *pdev)
|
|||
virq = irq_create_mapping(max8997->irq_domain, MAX8997_PMICIRQ_RTCA1);
|
||||
if (!virq) {
|
||||
dev_err(&pdev->dev, "Failed to create mapping alarm IRQ\n");
|
||||
ret = -ENXIO;
|
||||
goto err_out;
|
||||
}
|
||||
info->virq = virq;
|
||||
|
|
@ -498,13 +499,9 @@ static int max8997_rtc_probe(struct platform_device *pdev)
|
|||
ret = devm_request_threaded_irq(&pdev->dev, virq, NULL,
|
||||
max8997_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_out;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
err_out:
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue