File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
# SPDX-License-Identifier: GPL-2.0-only
2
2
# Empty file waiting for deletion once Makefile.boot isn't needed any more.
3
3
# Patch waits for application at
4
- # http ://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
4
+ # https ://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
Original file line number Diff line number Diff line change @@ -592,26 +592,31 @@ static void __init at91_pm_sram_init(void)
592
592
sram_pool = gen_pool_get (& pdev -> dev , NULL );
593
593
if (!sram_pool ) {
594
594
pr_warn ("%s: sram pool unavailable!\n" , __func__ );
595
- return ;
595
+ goto out_put_device ;
596
596
}
597
597
598
598
sram_base = gen_pool_alloc (sram_pool , at91_pm_suspend_in_sram_sz );
599
599
if (!sram_base ) {
600
600
pr_warn ("%s: unable to alloc sram!\n" , __func__ );
601
- return ;
601
+ goto out_put_device ;
602
602
}
603
603
604
604
sram_pbase = gen_pool_virt_to_phys (sram_pool , sram_base );
605
605
at91_suspend_sram_fn = __arm_ioremap_exec (sram_pbase ,
606
606
at91_pm_suspend_in_sram_sz , false);
607
607
if (!at91_suspend_sram_fn ) {
608
608
pr_warn ("SRAM: Could not map\n" );
609
- return ;
609
+ goto out_put_device ;
610
610
}
611
611
612
612
/* Copy the pm suspend handler to SRAM */
613
613
at91_suspend_sram_fn = fncpy (at91_suspend_sram_fn ,
614
614
& at91_pm_suspend_in_sram , at91_pm_suspend_in_sram_sz );
615
+ return ;
616
+
617
+ out_put_device :
618
+ put_device (& pdev -> dev );
619
+ return ;
615
620
}
616
621
617
622
static bool __init at91_is_pm_mode_active (int pm_mode )
You can’t perform that action at this time.
0 commit comments