Commit 4bab690
nvme-core: put ctrl ref when module ref get fail
When try_module_get() fails in the nvme_dev_open() it returns without
releasing the ctrl reference which was taken earlier.
Put the ctrl reference which is taken before calling the
try_module_get() in the error return code path.
Fixes: 52a3974 "nvme-core: get/put ctrl and transport module in nvme_dev_open/release()"
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>1 parent 6d53a9f commit 4bab690
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3265 | 3265 | | |
3266 | 3266 | | |
3267 | 3267 | | |
3268 | | - | |
| 3268 | + | |
| 3269 | + | |
3269 | 3270 | | |
| 3271 | + | |
3270 | 3272 | | |
3271 | 3273 | | |
3272 | 3274 | | |
| |||
0 commit comments