mm: hugetlb: fix hugepage memory leak caused by wrong reserve count
[linux/fpc-iii.git] / arch / mips / mti-sead3 / sead3-lcd.c
blob10b10ed21f7750997bf249fab527edf0c3a68c11
1 /*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
6 * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
7 */
8 #include <linux/init.h>
9 #include <linux/platform_device.h>
11 static struct resource __initdata sead3_lcd_resource = {
12 .start = 0x1f000400,
13 .end = 0x1f00041f,
14 .flags = IORESOURCE_MEM,
17 static __init int sead3_lcd_add(void)
19 struct platform_device *pdev;
20 int retval;
22 /* SEAD-3 and Cobalt platforms use same display type. */
23 pdev = platform_device_alloc("cobalt-lcd", -1);
24 if (!pdev)
25 return -ENOMEM;
27 retval = platform_device_add_resources(pdev, &sead3_lcd_resource, 1);
28 if (retval)
29 goto err_free_device;
31 retval = platform_device_add(pdev);
32 if (retval)
33 goto err_free_device;
35 return 0;
37 err_free_device:
38 platform_device_put(pdev);
40 return retval;
43 device_initcall(sead3_lcd_add);