cdrom: remove set but not used variable 'tocuse'
authorzhong jiang <zhongjiang@huawei.com>
Tue, 23 Oct 2018 12:06:37 +0000 (20:06 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Oct 2018 17:17:39 +0000 (11:17 -0600)
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>
drivers/cdrom/gdrom.c

index 757e85b81879cb8485969163338249406fe18270..b45c543c571acf10bf87991e45cb50ad850186da 100644 (file)
@@ -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");