lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Oct 2016 18:45:44 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-media@...r.kernel.org, Hans Verkuil <hverkuil@...all.nl>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Sean Young <sean@...s.org>,
        Wolfram Sang <wsa-dev@...g-engineering.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 16/18] [media] RedRat3: Move a variable assignment in
 redrat3_set_timeout()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Thu, 13 Oct 2016 17:13:41 +0200

Move the assignment for the local variable "rr3" behind the source code
for a memory allocation by this function.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/media/rc/redrat3.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c
index e46a92a..06c9eea 100644
--- a/drivers/media/rc/redrat3.c
+++ b/drivers/media/rc/redrat3.c
@@ -475,7 +475,7 @@ static u32 redrat3_get_timeout(struct redrat3_dev *rr3)
 
 static int redrat3_set_timeout(struct rc_dev *rc_dev, unsigned int timeoutns)
 {
-	struct redrat3_dev *rr3 = rc_dev->priv;
+	struct redrat3_dev *rr3;
 	__be32 *timeout;
 	int ret;
 
@@ -484,6 +484,7 @@ static int redrat3_set_timeout(struct rc_dev *rc_dev, unsigned int timeoutns)
 		return -ENOMEM;
 
 	*timeout = cpu_to_be32(redrat3_us_to_len(timeoutns / 1000));
+	rr3 = rc_dev->priv;
 	ret = usb_control_msg(rr3->udev,
 			      usb_sndctrlpipe(rr3->udev, 0),
 			      RR3_SET_IR_PARAM,
-- 
2.10.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ