Skip to content

Commit 4ded53e

Browse files
lienzeaxboe
authored andcommitted
cdrom: remove unused variable
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 <lienze@kylinos.cn> Link: https://lore.kernel.org/all/20220401032623.293666-1-lienze@kylinos.cn Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220401211842.2088096-1-phil@philpotter.co.uk Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 3123109 commit 4ded53e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/cdrom/cdrom.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,6 @@ static int cdrom_slot_status(struct cdrom_device_info *cdi, int slot)
13651365
*/
13661366
int cdrom_number_of_slots(struct cdrom_device_info *cdi)
13671367
{
1368-
int status;
13691368
int nslots = 1;
13701369
struct cdrom_changer_info *info;
13711370

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

1380-
if ((status = cdrom_read_mech_status(cdi, info)) == 0)
1379+
if (cdrom_read_mech_status(cdi, info) == 0)
13811380
nslots = info->hdr.nslots;
13821381

13831382
kfree(info);

0 commit comments

Comments
 (0)