pktcdvd: remove redundant initialization of variable ret
Subsystems (2)
PATCH 1/1 pktcdvd: remove redundant initialization of variable ret
From: Colin Ian King <[email protected]>
The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>
--- drivers/block/pktcdvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/pktcdvd.c +1 -1
@@ -1613,7 +1613,7 @@ static noinline_for_stack int pkt_get_last_written(struct pktcdvd_device *pd,disc_information di;track_information ti;__u32 last_track; -int ret =-1 ; +int ret; ret =pkt_get_disc_info (pd, &di);if (ret)
Signature · 1 line
2.27.0.rc0
Quoted 5 lines · Colin King
From: Colin Ian King <[email protected]>
The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.
Applied, thanks.
Signature · 1 line
Jens Axboe