diff options
author | Luis Chamberlain <[email protected]> | 2021-11-03 16:04:26 -0700 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2021-11-04 05:48:49 -0600 |
commit | b7421afcec0c77ab58633587ddc29d53e6eb95af (patch) | |
tree | 03fef5af24a9a73af40d63e3bea78feeb0dffbec /tools/perf/util/trace-event-scripting.c | |
parent | 16be7974ff5d0a5cd9f345571c3eac1c3f6ba6de (diff) |
nvdimm/blk: avoid calling del_gendisk() on early failures
If nd_integrity_init() fails we'd get del_gendisk() called,
but that's not correct as we should only call that if we're
done with device_add_disk(). Fix this by providing unwinding
prior to the devm call being registered and moving the devm
registration to the very end.
This should fix calling del_gendisk() if nd_integrity_init()
fails. I only spotted this issue through code inspection. It
does not fix any real world bug.
Reviewed-by: Christoph Hellwig <[email protected]>
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/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions