diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-01-20 21:00:01 -0800 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-02-06 09:58:03 -0800 |
commit | 85cfb3a83536ad7f055b45f3a9c227848fa4dc80 (patch) | |
tree | 99ecfa2660a4a8cf7c695ed93091dcba798d3411 /scripts/bloat-o-meter | |
parent | e1e081a7e3ae7c2390889688b4f8a0c7dbb6bb6b (diff) |
hwmon: (pmbus) Use krealloc to allocate attribute memory
So far, attribute memory was allocated by pre-calculating the maximum possible
amount of attributes. Not only does this waste memory, it is also risky because
the calculation might be wrong. It also requires a lot of defines to specify
the maximum number of attributes per class.
Allocate attribute memory using krealloc() instead. That means we have to use
kfree(), since devm_krealloc() does not exist, but that is still less costly
and less risky than trying to predict the number of attributes at the beginning.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'scripts/bloat-o-meter')
0 files changed, 0 insertions, 0 deletions