mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-19 11:23:11 +00:00
![Logan Gunthorpe](/assets/img/avatar_default.png)
Replace the open coded registration of the cdev and dev with the new device_add_cdev() helper. The helper replaces a common pattern by taking the proper reference against the parent device and adding both the cdev and the device. At the same time we cleanup the error path through device_probe function: we use put_device instead of kfree directly as recommended by the device_initialize documentation. Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>