Skip to content

Commit

Permalink
cdrom: remove set but not used variable 'tocuse'
Browse files Browse the repository at this point in the history
tocuse is not used after setting its value. It is safe to remove
the unused variable.

Signed-off-by: zhong jiang <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
xiongzhongjiang authored and axboe committed Oct 25, 2018
1 parent d91dc17 commit cdffab7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/cdrom/gdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit cdffab7

Please sign in to comment.