Skip to content

Commit

Permalink
ARM: shark: fix shark_pci_init return code
Browse files Browse the repository at this point in the history
When run on the wrong platform, the shark_pci_init function
returns an undefined value, as reported by a gcc warning,
so let's just return -ENODEV.

Without this patch, building shark_defconfig results in:

arch/arm/mach-shark/pci.c: In function 'shark_pci_init':
arch/arm/mach-shark/pci.c:42:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: "Krzysztof Halasa" <khc@pm.waw.pl>
  • Loading branch information
Arnd Bergmann committed Oct 4, 2012
1 parent a0d271c commit 9c7f4f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-shark/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static struct hw_pci shark_pci __initdata = {
static int __init shark_pci_init(void)
{
if (!machine_is_shark())
return;
return -ENODEV;

pcibios_min_io = 0x6000;
pcibios_min_mem = 0x50000000;
Expand Down

0 comments on commit 9c7f4f5

Please sign in to comment.