Quoting Dmitry Baryshkov (2021-04-07 17:52:01) > > Short story: no other patches needed. > > Long story: > I've checked the rest of devres allocations in clk subsystem. > Interesting, they use a bit different pattern: they devres_alloc a > pointer to the clock, then they fill the pointer with the new clock > data. The release callback would (correctly) free the clock pointer by > the devres and then devres code would kfree the devres data (clock > pointer). > > The fixed-factor is unique in this area, because it devres_alloc's a > clock instance (rather than the pointer) and then fills it, so it > should not be freed in the release callback (only unregistered) with > the devres code kfreeing() the instance itself. > > Cool thanks for checking. Maybe we should change those other callers in clk directory to devres alloc the container structure instead of a pointer. Then we avoid the double allocation. Glad it's not a critical fix though.