Skip to content

Commit

Permalink
cdrom: remove unused variable
Browse files Browse the repository at this point in the history
The clang static analyzer reports the following warning,

File: drivers/cdrom/cdrom.c
Warning: line 1380, column 7
	 Although the value stored to 'status' is used in enclosing
	 expression, the value is never actually read from 'status'

Remove the unused variable to eliminate the warning.

Signed-off-by: Enze Li <[email protected]>
Link: https://lore.kernel.org/all/[email protected]
Signed-off-by: Phillip Potter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
lienze authored and axboe committed Apr 6, 2022
1 parent 3123109 commit 4ded53e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/cdrom/cdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,6 @@ static int cdrom_slot_status(struct cdrom_device_info *cdi, int slot)
*/
int cdrom_number_of_slots(struct cdrom_device_info *cdi)
{
int status;
int nslots = 1;
struct cdrom_changer_info *info;

Expand All @@ -1377,7 +1376,7 @@ int cdrom_number_of_slots(struct cdrom_device_info *cdi)
if (!info)
return -ENOMEM;

if ((status = cdrom_read_mech_status(cdi, info)) == 0)
if (cdrom_read_mech_status(cdi, info) == 0)
nslots = info->hdr.nslots;

kfree(info);
Expand Down

0 comments on commit 4ded53e

Please sign in to comment.