Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933311AbcJMQqa (ORCPT ); Thu, 13 Oct 2016 12:46:30 -0400 Received: from mout.web.de ([212.227.15.3]:61716 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933248AbcJMQqV (ORCPT ); Thu, 13 Oct 2016 12:46:21 -0400 Subject: [PATCH 16/18] [media] RedRat3: Move a variable assignment in redrat3_set_timeout() To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Sean Young , Wolfram Sang References: <566ABCD9.1060404@users.sourceforge.net> <81cef537-4ad0-3a74-8bde-94707dcd03f4@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <1877a803-14b2-b064-f051-841b82fb2076@users.sourceforge.net> Date: Thu, 13 Oct 2016 18:45:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <81cef537-4ad0-3a74-8bde-94707dcd03f4@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:vS5amltVF9F9SCPh5HGZRHWtjBLGQlAJtCFw9Ba+knd9Zi9DGgh z6Fk3bUyrVCQpQr7ARRFiQfmzz736nFiuNgwZPeqZrBbSmTAGsSDBac3uyPmN+NhK9xQbkv ugh0GCSeUKTd89GhTwzv5Uzgv634c9iX4d2NmpVqPoAa633tpAtMyJcL33kZejDeTbqL4gx BKvaqC4n7dUQtDpaoBSLA== X-UI-Out-Filterresults: notjunk:1;V01:K0:jUKhrwp7CFw=:OivG+7XQaohn82etU5St6F maH6aQfAdyY2pJfkngX5vLl7nwRycSeI+JqMCl0E1FldeXMa7gNedbij0s84NEJys5M1ZnTZM MN00tmf2kD412T1XlLtDrODkzfuU+D2TNxDuhGVEdFnm7pq7FYwjp2v7A2PF5GUvjhnHozW9o /59Du12KDMaw3g84DiCCaCdxYZ6t81gRvVt8h3aTNzA5oQ9EGs4R9FM5/ExTO8enHKIrGevel QPenu3C7GTscpOqiI0yDM6qUsSVxr4xDB5vA+BWDpfMBdabcnzAR0nkEWxccrUszgo8x7Ahh3 HeM8A72moXMyZkDJ1ga5qJbGxZWiypx7dkaSynl+Bh1AOa7bMGSgXPLx2Xv0EoklPb1s6fWCL o4B16umwIZDI+1xDRfuKUUlJVj70QbfxWhr+RwKZSTi+oJBJ9nMsBIHszntkgOPTW8dPyZKAz hNBhzHPvX0Uwq2jEIgkEXMDUaepmUzmRicZZ6tI5xUook1GpIf4hVJkk7pp4cJmGAuVRRPynJ bVxFb5m304Dw2fcZxt+eJPuVzjBf0gZyRmws0lQ9YNIIQsbMyMJcx2qucK4WknW/XeW2UqXXD sw2Y+vaKriaMgyDDupEsqwZPrYB5epqpQQt30mWMkDp4Mt6cbIpZEC6HI7HupbO27KQSlqzKh bDSNCV4imNtAA7UP3pmBpao2TxiDfqUCYwM6L/W6e83+WwzNF1TmZ2km/qY85+R9zMaAyuErL bn4+GA4zSVacI05mV8Ixfhr/FmHlUJsm68YAx9w5tlzzRSGwFTp78TP+cfU36qc/O0ypqtNWM NRrYGKZ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1103 Lines: 34 From: Markus Elfring 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 --- 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