Skip to content

Commit cdffab7

Browse files
xiongzhongjiangaxboe
authored andcommitted
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>
1 parent d91dc17 commit cdffab7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/cdrom/gdrom.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,15 +327,15 @@ static int get_entry_track(int track)
327327
static int gdrom_get_last_session(struct cdrom_device_info *cd_info,
328328
struct cdrom_multisession *ms_info)
329329
{
330-
int fentry, lentry, track, data, tocuse, err;
330+
int fentry, lentry, track, data, err;
331+
331332
if (!gd.toc)
332333
return -ENOMEM;
333-
tocuse = 1;
334+
334335
/* Check if GD-ROM */
335336
err = gdrom_readtoc_cmd(gd.toc, 1);
336337
/* Not a GD-ROM so check if standard CD-ROM */
337338
if (err) {
338-
tocuse = 0;
339339
err = gdrom_readtoc_cmd(gd.toc, 0);
340340
if (err) {
341341
pr_info("Could not get CD table of contents\n");

0 commit comments

Comments
 (0)