Commit ec341439 authored by Jason Yan's avatar Jason Yan Committed by Martin K. Petersen

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.comReported-by: default avatarHulk Robot <hulkci@huawei.com>
Acked-by: default avatarKai Mäkisara <kai.makisara@kolumbus.fi>
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7109cb51
...@@ -1457,7 +1457,6 @@ static int st_flush(struct file *filp, fl_owner_t id) ...@@ -1457,7 +1457,6 @@ static int st_flush(struct file *filp, fl_owner_t id)
accessing this tape. */ accessing this tape. */
static int st_release(struct inode *inode, struct file *filp) static int st_release(struct inode *inode, struct file *filp)
{ {
int result = 0;
struct scsi_tape *STp = filp->private_data; struct scsi_tape *STp = filp->private_data;
if (STp->door_locked == ST_LOCKED_AUTO) if (STp->door_locked == ST_LOCKED_AUTO)
...@@ -1470,9 +1469,9 @@ static int st_release(struct inode *inode, struct file *filp) ...@@ -1470,9 +1469,9 @@ static int st_release(struct inode *inode, struct file *filp)
scsi_autopm_put_device(STp->device); scsi_autopm_put_device(STp->device);
scsi_tape_put(STp); scsi_tape_put(STp);
return result; return 0;
} }
/* The checks common to both reading and writing */ /* The checks common to both reading and writing */
static ssize_t rw_checks(struct scsi_tape *STp, struct file *filp, size_t count) static ssize_t rw_checks(struct scsi_tape *STp, struct file *filp, size_t count)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment