media: imon: Remove the unneeded result variable
authorye xingchen <ye.xingchen@zte.com.cn>
Tue, 30 Aug 2022 08:30:27 +0000 (10:30 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 05:50:12 +0000 (07:50 +0200)
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>
drivers/media/rc/imon.c

index 735b925da99847599c749be0fff8844fcae77650..5edfd8a9e84944c6c04b0438c16a75cf34976509 100644 (file)
@@ -684,7 +684,6 @@ static int send_packet(struct imon_context *ictx)
  */
 static int send_associate_24g(struct imon_context *ictx)
 {
-       int retval;
        const unsigned char packet[8] = { 0x01, 0x00, 0x00, 0x00,
                                          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));
-       retval = send_packet(ictx);
 
-       return retval;
+       return send_packet(ictx);
 }
 
 /*