diff options
author | Jason Yan <yanaijie@huawei.com> | 2020-04-18 15:06:05 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-04-22 00:05:29 -0400 |
commit | ec34143912667c0f34cd6e0667344dde5e725f13 (patch) | |
tree | eeb552be8262052c73932a23761bf6783fc9e9f9 /drivers/scsi/st.c | |
parent | 7109cb51517267ef0631da293d80a26f4e18d3ba (diff) |
scsi: st: remove unneeded variable 'result' in st_release()
Also remove a strange '^L' after this function.
Fix the following coccicheck warning:
drivers/scsi/st.c:1460:5-11: Unneeded variable: "result". Return "0" on
line 1473
Link: https://lore.kernel.org/r/20200418070605.11450-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index c5f9b348b438..4bf4ab3b70f4 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -1457,7 +1457,6 @@ static int st_flush(struct file *filp, fl_owner_t id) accessing this tape. */ static int st_release(struct inode *inode, struct file *filp) { - int result = 0; struct scsi_tape *STp = filp->private_data; if (STp->door_locked == ST_LOCKED_AUTO) @@ -1470,9 +1469,9 @@ static int st_release(struct inode *inode, struct file *filp) scsi_autopm_put_device(STp->device); scsi_tape_put(STp); - return result; + return 0; } - + /* The checks common to both reading and writing */ static ssize_t rw_checks(struct scsi_tape *STp, struct file *filp, size_t count) { |