Axel Lin
c71c8fd4da
regulator: palmas: Fix wrong kfree calls
...
The devm_kzalloc function eliminates the need for manual resource releasing
and simplify error handling. Resources allocated by devm_* are freed
automatically on driver detach.
Thus adding kfree calls here will introduce double free bug.
The memory of desc array and the pointers to the rdev[] are allocated by
devm_kzalloc call for struct palmas_pmic.
struct palmas_pmic {
struct palmas *palmas;
struct device *dev;
struct regulator_desc desc[PALMAS_NUM_REGS];
struct regulator_dev *rdev[PALMAS_NUM_REGS];
struct mutex mutex;
int smps123;
int smps457;
int range[PALMAS_REG_SMPS10];
};
Which means we should not call kfree for pmic->rdev and pmic->desc.
Signed-off-by: Axel Lin <axel.lin@gmail.com >
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com >
2012-06-04 10:42:49 +01:00
..
2012-05-30 10:12:48 -07:00
2012-05-26 12:22:27 -07:00
2012-05-26 12:42:29 -07:00
2012-05-24 16:22:53 -04:00
2012-06-01 10:34:35 -07:00
2012-05-24 11:54:29 -07:00
2012-05-31 08:46:50 +02:00
2012-05-24 11:54:29 -07:00
2012-03-16 09:28:05 +11:00
2012-05-24 12:42:54 -07:00
2012-05-26 13:05:55 -07:00
2012-05-02 00:39:43 +02:00
2012-05-02 00:25:13 +02:00
2012-05-08 12:35:06 +02:00
2012-05-26 12:42:29 -07:00
2012-05-23 14:07:06 -07:00
2012-05-26 12:57:47 -07:00
2012-05-30 12:11:32 -07:00
2012-05-22 16:02:13 -07:00
2012-05-24 12:57:47 -07:00
2012-05-03 17:19:19 -07:00
2012-05-29 18:27:19 -07:00
2012-06-01 15:40:29 -07:00
2012-05-22 19:22:50 -07:00
2012-04-23 14:23:32 +03:00
2012-05-22 16:02:13 -07:00
2012-05-30 07:56:20 +02:00
2012-05-30 10:55:34 +02:00
2012-03-28 18:30:03 +01:00
2012-04-05 15:25:50 -07:00
2012-05-16 15:17:08 -04:00
2012-05-14 13:37:45 -07:00
2012-05-21 17:54:55 -07:00
2012-05-30 10:55:34 +02:00
2012-05-30 08:49:28 -07:00
2012-05-24 11:54:29 -07:00
2012-05-29 16:22:32 -07:00
2012-05-09 10:58:21 +10:00
2012-06-02 17:39:40 -07:00
2012-05-26 12:42:29 -07:00
2012-05-14 12:52:52 -07:00
2012-03-20 21:48:19 +08:00
2012-05-31 18:10:18 -07:00
2012-06-01 02:04:46 +02:00
2012-05-29 11:53:11 -07:00
2012-05-26 12:57:47 -07:00
2012-06-01 16:55:42 -07:00
2012-06-02 17:09:08 -04:00
2012-05-25 11:16:16 -04:00
2012-03-28 18:30:03 +01:00
2012-05-29 18:27:19 -07:00
2012-04-05 15:25:50 -07:00
2012-05-22 19:22:50 -07:00
2012-05-22 16:02:13 -07:00
2012-05-29 18:27:19 -07:00
2012-05-07 09:56:39 +08:00
2012-06-01 02:03:25 +02:00
2012-06-01 15:18:52 -04:00
2012-03-30 16:45:39 -07:00
2012-05-31 12:10:15 -07:00
2012-04-24 18:18:01 -07:00
2012-05-22 19:22:50 -07:00
2012-05-31 17:49:31 -07:00
2012-06-04 10:42:49 +01:00
2012-05-30 08:49:28 -07:00
2012-05-29 16:22:34 -07:00
2012-05-31 10:51:10 -07:00
2012-03-28 18:30:03 +01:00
2012-05-31 12:02:41 -07:00
2012-05-22 19:07:55 +09:00
2012-05-26 13:05:55 -07:00
2012-05-16 12:46:37 -04:00
2012-05-29 16:22:22 -07:00
2012-05-23 16:52:27 -07:00
2012-03-22 01:10:18 -04:00
2012-06-02 15:21:43 -07:00
2012-05-15 08:44:58 -07:00
2012-05-26 12:42:29 -07:00
2012-04-18 13:15:51 -07:00
2012-05-16 22:17:37 -04:00
2012-06-01 16:57:51 -07:00
2012-05-22 12:16:15 +09:30
2012-05-08 16:01:34 -07:00
2012-05-26 12:42:29 -07:00
2012-05-30 08:16:48 +02:00
2012-05-29 20:14:53 -07:00
2012-05-22 16:34:21 -07:00
2012-05-26 12:22:27 -07:00