Michal Wilczynski wrote: > devm_*() family of functions purpose is managing memory attached to a > device. So in general it should only be used for allocations that should > last for the whole lifecycle of the device. No, this assertion is not accurate, if it were strictly true then devm_kfree() should be deleted. This patch is only a cleanup to switch the automatic cleanup pattern from devm to the new cleanup.h helpers. I am all for modernizing code over time, but patches that make assertions of "memory leaks" and "incorrect API usage" in code that has been untouched for almost a decade demand more scrutiny than what transpired here.