cpufreq: cpufreq_interactive: avoid NULL point access
[firefly-linux-kernel-4.4.55.git] / drivers / cpufreq / rockchip-cpufreq.c
1 /*
2  *
3  * Copyright (C) 2015 Fuzhou Rockchip Electronics Co., Ltd
4  *
5  * Xiao Feng <xf@rock-chips.com>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12  * kind, whether express or implied; without even the implied warranty
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  */
16
17 #include <linux/err.h>
18 #include <linux/init.h>
19 #include <linux/kernel.h>
20 #include <linux/module.h>
21 #include <linux/of.h>
22 #include <linux/platform_device.h>
23
24 static int __init rockchip_cpufreq_driver_init(void)
25 {
26         struct platform_device *pdev;
27
28         pdev = platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
29         return PTR_ERR_OR_ZERO(pdev);
30 }
31 module_init(rockchip_cpufreq_driver_init);
32
33 MODULE_AUTHOR("Xiao Feng <xf@rock-chips.com>");
34 MODULE_DESCRIPTION("Rockchip cpufreq driver");
35 MODULE_LICENSE("GPL v2");
36