diff options
| author | Jason Gunthorpe <[email protected]> | 2017-03-17 12:48:15 -0600 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2017-03-21 06:44:33 +0100 |
| commit | a0d78193dcf2bfa7c3d169c55a7a30a5a89fca7a (patch) | |
| tree | 1b2c23c01c1a415cf4bad27b0e30d2e6cae3b074 /tools/perf/scripts/python | |
| parent | 1c1d152cc5ac3a67d199728a9ba0b4f54a498f8b (diff) | |
IB/ucm: utilize new cdev_device_add helper function
The use after free is not triggerable here because the cdev holds
the module lock and the only device_unregister is only triggered by
module unload, however make the change for consistency.
To make this work the cdev_del needs to move out of the struct device
release function.
This cleans up the error path significantly and thus also fixes a minor
bug where the devnum would not be released if cdev_add failed.
Signed-off-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Logan Gunthorpe <[email protected]>
Reviewed-by: Logan Gunthorpe <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions