aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorLuis Chamberlain <[email protected]>2021-09-27 15:02:52 -0700
committerJens Axboe <[email protected]>2021-10-18 14:41:37 -0600
commit662167e59d2f3c15a44a88088fc6c1a67c8a3650 (patch)
tree3fb4a4cbc8b7f74acb70ea6ba8fa2fde61964578 /tools/perf/scripts/python
parent3776339ae7acaf9590c668e86f45005fc9aff014 (diff)
floppy: fix calling platform_device_unregister() on invalid drives
platform_device_unregister() should only be called when a respective platform_device_register() is called. However the floppy driver currently allows failures when registring a drive and a bail out could easily cause an invalid call to platform_device_unregister() where it was not intended. Fix this by adding a bool to keep track of when the platform device was registered for a drive. This does not fix any known panic / bug. This issue was found through code inspection while preparing the driver to use the up and coming support for device_add_disk() error handling. From what I can tell from code inspection, chances of this ever happening should be insanely small, perhaps OOM. Signed-off-by: Luis Chamberlain <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions