diff options
| author | 2017-03-17 12:48:20 -0600 | |
|---|---|---|
| committer | 2017-03-21 06:44:33 +0100 | |
| commit | dbef390d2eb0a7b0a6be21381a326d4e13953aba (patch) | |
| tree | 959cf65e5592d2d397f92eef4141f70bf200860f /drivers/rtc/rtc-dev.c | |
| parent | mtd: utilize new cdev_device_add helper function (diff) | |
| download | wireguard-linux-dbef390d2eb0a7b0a6be21381a326d4e13953aba.tar.xz wireguard-linux-dbef390d2eb0a7b0a6be21381a326d4e13953aba.zip | |
rapidio: utilize new cdev_device_add helper function
This driver did not originally set kobj.parent so it likely had
potential a use after free bug which this patch fixes.
We convert from device_register to device_initialize/cdev_device_add.
While we are at it we use put_device instead of kfree (as recommended
by the device_initialize documentation). We also remove an unnecessary
extra get_device from the code.
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
0 files changed, 0 insertions, 0 deletions
