]> git.baikalelectronics.ru Git - kernel.git/commitdiff
nvme-fabrics: remove the unneeded ret variable in nvmf_dev_show
authorChangcheng Deng <deng.changcheng@zte.com.cn>
Fri, 7 Jan 2022 02:23:06 +0000 (02:23 +0000)
committerChristoph Hellwig <hch@lst.de>
Thu, 27 Jan 2022 07:17:17 +0000 (08:17 +0100)
Remove unneeded variable and directly return 0.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fabrics.c

index 7ae041e2b3fb0508f0016e6473e8a5e040902139..f79a66d4e22cec200b3a35d12c9c47efcbb07425 100644 (file)
@@ -1092,7 +1092,6 @@ static void __nvmf_concat_opt_tokens(struct seq_file *seq_file)
 static int nvmf_dev_show(struct seq_file *seq_file, void *private)
 {
        struct nvme_ctrl *ctrl;
-       int ret = 0;
 
        mutex_lock(&nvmf_dev_mutex);
        ctrl = seq_file->private;
@@ -1106,7 +1105,7 @@ static int nvmf_dev_show(struct seq_file *seq_file, void *private)
 
 out_unlock:
        mutex_unlock(&nvmf_dev_mutex);
-       return ret;
+       return 0;
 }
 
 static int nvmf_dev_open(struct inode *inode, struct file *file)