Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: dsa: ocelot: use devres in ocelot_ext_probe()
Russell King suggested that felix_vsc9959, seville_vsc9953 and ocelot_ext have a large portion of duplicated init and teardown code, which could be made common [1]. The teardown code could even be simplified away if we made use of devres, something which is used here and there in the felix driver, just not very consistently. [1] https://lore.kernel.org/all/[email protected]/ Prepare the ground in the ocelot_ext driver, by allocating the data structures using devres and deleting the kfree() calls. This also deletes the "Failed to allocate ..." message, since memory allocation errors are extremely loud anyway, and it's hard to miss them. Suggested-by: "Russell King (Oracle)" <[email protected]> Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Colin Foster <[email protected]> Tested-by: Colin Foster <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information