media: imon: Remove the unneeded result variable

Return the value send_packet() directly instead of storing it in another
redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
ye xingchen 2022-08-30 10:30:27 +02:00 committed by Mauro Carvalho Chehab
parent 41fd1cb615
commit 2dfe2c4f17

View file

@ -684,7 +684,6 @@ static int send_packet(struct imon_context *ictx)
*/ */
static int send_associate_24g(struct imon_context *ictx) static int send_associate_24g(struct imon_context *ictx)
{ {
int retval;
const unsigned char packet[8] = { 0x01, 0x00, 0x00, 0x00, const unsigned char packet[8] = { 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x20 }; 0x00, 0x00, 0x00, 0x20 };
@ -699,9 +698,8 @@ static int send_associate_24g(struct imon_context *ictx)
} }
memcpy(ictx->usb_tx_buf, packet, sizeof(packet)); memcpy(ictx->usb_tx_buf, packet, sizeof(packet));
retval = send_packet(ictx);
return retval; return send_packet(ictx);
} }
/* /*