projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'block5.9-2020-10-08' of git://git.kernel.dk/linux-block
[platform/kernel/linux-starfive.git]
/
drivers
/
nvme
/
host
/
core.c
diff --git
a/drivers/nvme/host/core.c
b/drivers/nvme/host/core.c
index
8f9d61e
..
893e296
100644
(file)
--- a/
drivers/nvme/host/core.c
+++ b/
drivers/nvme/host/core.c
@@
-3265,8
+3265,10
@@
static int nvme_dev_open(struct inode *inode, struct file *file)
}
nvme_get_ctrl(ctrl);
- if (!try_module_get(ctrl->ops->module))
+ if (!try_module_get(ctrl->ops->module)) {
+ nvme_put_ctrl(ctrl);
return -EINVAL;
+ }
file->private_data = ctrl;
return 0;