diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-09-27 01:54:22 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2012-10-02 17:34:24 -0400 |
commit | 07684c1b582ddd991c908f3de26e823b977d0a75 (patch) | |
tree | bcfe36169bdc38c04121da36917db58db4c52a61 /arch/arm/mach-omap2/sr_device.c | |
parent | a87e662827bca4b10a320e62da3fb21826eab987 (diff) |
ARM: OMAP2+: SmartReflex: fix return value check in sr_dev_init()
In case of error, the function voltdm_lookup() returns NULL
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/sr_device.c')
-rw-r--r-- | arch/arm/mach-omap2/sr_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c index d033a65f4e4e..c248b309415b 100644 --- a/arch/arm/mach-omap2/sr_device.c +++ b/arch/arm/mach-omap2/sr_device.c | |||
@@ -123,7 +123,7 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user) | |||
123 | sr_data->senp_mod = 0x1; | 123 | sr_data->senp_mod = 0x1; |
124 | 124 | ||
125 | sr_data->voltdm = voltdm_lookup(sr_dev_attr->sensor_voltdm_name); | 125 | sr_data->voltdm = voltdm_lookup(sr_dev_attr->sensor_voltdm_name); |
126 | if (IS_ERR(sr_data->voltdm)) { | 126 | if (!sr_data->voltdm) { |
127 | pr_err("%s: Unable to get voltage domain pointer for VDD %s\n", | 127 | pr_err("%s: Unable to get voltage domain pointer for VDD %s\n", |
128 | __func__, sr_dev_attr->sensor_voltdm_name); | 128 | __func__, sr_dev_attr->sensor_voltdm_name); |
129 | goto exit; | 129 | goto exit; |