Commit b20d4ea8 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] do not leak memory in powernow-k8

From Pavel Machek
parent b5e6a0c5
...@@ -687,11 +687,13 @@ find_psb_table(void) ...@@ -687,11 +687,13 @@ find_psb_table(void)
if (ppst[j].vid < rvo) { /* vid+rvo >= 0 */ if (ppst[j].vid < rvo) { /* vid+rvo >= 0 */
printk(KERN_ERR BFX printk(KERN_ERR BFX
"0 vid exceeded with pstate %d\n", j); "0 vid exceeded with pstate %d\n", j);
kfree(ppst);
return -ENODEV; return -ENODEV;
} }
if (ppst[j].vid < maxvid+rvo) { /* vid+rvo >= maxvid */ if (ppst[j].vid < maxvid+rvo) { /* vid+rvo >= maxvid */
printk(KERN_ERR BFX printk(KERN_ERR BFX
"maxvid exceeded with pstate %d\n", j); "maxvid exceeded with pstate %d\n", j);
kfree(ppst);
return -ENODEV; return -ENODEV;
} }
} }
...@@ -706,7 +708,7 @@ find_psb_table(void) ...@@ -706,7 +708,7 @@ find_psb_table(void)
for (j = 0; j < numps; j++) for (j = 0; j < numps; j++)
if ((ppst[j].fid==currfid) && (ppst[j].vid==currvid)) if ((ppst[j].fid==currfid) && (ppst[j].vid==currvid))
return (0); return 0;
printk(KERN_ERR BFX "currfid/vid do not match PST, ignoring\n"); printk(KERN_ERR BFX "currfid/vid do not match PST, ignoring\n");
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment