Skip to content

Commit

Permalink
ARM: OMAP2+: PM: fix return value check in omap2_set_init_voltage()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Kevin Hilman committed Oct 2, 2012
1 parent 07684c1 commit 93b44be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
}

voltdm = voltdm_lookup(vdd_name);
if (IS_ERR(voltdm)) {
if (!voltdm) {
pr_err("%s: unable to get vdd pointer for vdd_%s\n",
__func__, vdd_name);
goto exit;
Expand Down

0 comments on commit 93b44be

Please sign in to comment.