mirror of
https://github.com/torvalds/linux.git
synced 2024-12-22 02:52:56 +00:00
b5031b7db7
fixes following Smatch static check warning:
drivers/pinctrl/berlin/berlin.c:237 berlin_pinctrl_build_state()
warn: passing devm_ allocated variable to kfree. 'pctrl->functions'
As we will be calling krealloc() on pointer 'pctrl->functions', which means
kfree() will be called in there, devm_kzalloc() shouldn't be used with
the allocation in the first place. Fix the warning by calling kcalloc()
and managing the free procedure in error path on our own.
Fixes:
|
||
---|---|---|
.. | ||
berlin-bg2.c | ||
berlin-bg2cd.c | ||
berlin-bg2q.c | ||
berlin-bg4ct.c | ||
berlin.c | ||
berlin.h | ||
Kconfig | ||
Makefile | ||
pinctrl-as370.c |