platform_device_put(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie πŸ’– welcome to platform_device_put(9) from the Kernel API Manual β€” lowkey tiny, highkey important, and it's giving cleanup-era main character energy. πŸŽ€

🌸 NAME 🌸

platform_device_put β€” destroy a platform device. That's the whole assignment, no cap. πŸ’…

✨ SYNOPSIS ✨

void platform_device_put (struct platform_device *pdev );

πŸŽ€ ARGUMENTS πŸŽ€

  • pdev β€” the platform device to free. That's the one getting the goodbye, bestie. 🫢

πŸ’… DESCRIPTION πŸ’…

Okay so this function frees all memory associated with a platform device. All of it. Every little byte of the vibe. πŸ’¨

But listen, because this is the part that matters: this function must _only_ be externally called in error cases. All other usage is a bug. Not a quirky little choice, not a "maybe it'll be fine," literally a bug. 😭

🚩 The rules are rules: externally in error cases only. All other usage is a bug. Periodt.

πŸ¦‹ SEE ALSO πŸ¦‹


That's a wrap, bestie. Source/version: ./drivers/base. Date: October 2026. Manual: platform_device_put(9). Free responsibly, stay in error cases, and slay the cleanup path. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from