diff options
author | zhong jiang <zhongjiang@huawei.com> | 2018-10-23 20:06:37 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-10-25 11:17:39 -0600 |
commit | cdffab7a86b05b207907c391c093023daed5d4a4 (patch) | |
tree | 54296bcb930c94efea7c8d58be763bf1727fbf60 /drivers/cdrom | |
parent | d91dc172e34f6954a94957b012c3b08f4103d5f9 (diff) | |
download | linux-cdffab7a86b05b207907c391c093023daed5d4a4.tar.gz linux-cdffab7a86b05b207907c391c093023daed5d4a4.tar.bz2 linux-cdffab7a86b05b207907c391c093023daed5d4a4.zip |
cdrom: remove set but not used variable 'tocuse'
tocuse is not used after setting its value. It is safe to remove
the unused variable.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/cdrom')
-rw-r--r-- | drivers/cdrom/gdrom.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index 757e85b81879..b45c543c571a 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c @@ -327,15 +327,15 @@ static int get_entry_track(int track) static int gdrom_get_last_session(struct cdrom_device_info *cd_info, struct cdrom_multisession *ms_info) { - int fentry, lentry, track, data, tocuse, err; + int fentry, lentry, track, data, err; + if (!gd.toc) return -ENOMEM; - tocuse = 1; + /* Check if GD-ROM */ err = gdrom_readtoc_cmd(gd.toc, 1); /* Not a GD-ROM so check if standard CD-ROM */ if (err) { - tocuse = 0; err = gdrom_readtoc_cmd(gd.toc, 0); if (err) { pr_info("Could not get CD table of contents\n"); |