OSDN Git Service

regulator: Remove pointer table overallocation
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Sun, 9 Aug 2020 19:21:16 +0000 (21:21 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 18 Aug 2020 16:18:44 +0000 (17:18 +0100)
commit7d8196641ee1eea6223e68ff92362652b1c8346b
tree3082b27b065788c56f64cf73d5f082ed3f45bcc1
parentaedf7451e7535bc93bb9cec0ebc91744934da95c
regulator: Remove pointer table overallocation

The code allocates sizeof(regulator_dev) for a pointer. Make it less
generous. Let kcalloc() calculate the size, while at it.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/407fbd06a02caf038a9ba3baa51c7d6d47cd6517.1597000795.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c