Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: dvb-usb-v2: lmedm04: remove unnecessary variable in lme2510_stream_restart()

Remove unnecessary variable _ret_ and refactor the code.

Addresses-Coverity-ID: 1226934

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Gustavo A. R. Silva and committed by
Mauro Carvalho Chehab
d83bc7b6 b138afda

+4 -6
+4 -6
drivers/media/usb/dvb-usb-v2/lmedm04.c
··· 207 207 struct lme2510_state *st = d->priv; 208 208 u8 all_pids[] = LME_ALL_PIDS; 209 209 u8 stream_on[] = LME_ST_ON_W; 210 - int ret; 211 210 u8 rbuff[1]; 212 211 if (st->pid_off) 213 - ret = lme2510_usb_talk(d, all_pids, sizeof(all_pids), 214 - rbuff, sizeof(rbuff)); 212 + lme2510_usb_talk(d, all_pids, sizeof(all_pids), 213 + rbuff, sizeof(rbuff)); 215 214 /*Restart Stream Command*/ 216 - ret = lme2510_usb_talk(d, stream_on, sizeof(stream_on), 217 - rbuff, sizeof(rbuff)); 218 - return ret; 215 + return lme2510_usb_talk(d, stream_on, sizeof(stream_on), 216 + rbuff, sizeof(rbuff)); 219 217 } 220 218 221 219 static int lme2510_enable_pid(struct dvb_usb_device *d, u8 index, u16 pid_out)