From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Fri, 26 Aug 2016 12:55:44 +0000 Subject: [PATCH 5/8] cris-cryptocop: Move an assignment for the variable "nooutpages" in cryptocop_ioctl_proc Message-Id: <2a70980b-54e3-812c-b76e-6b64640c469c@users.sourceforge.net> List-Id: References: <566ABCD9.1060404@users.sourceforge.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-cris-kernel@axis.com, Adam Buchbinder , Dave Hansen , Ingo Molnar , Jesper Nilsson , Jiri Kosina , Mikael Starvik , Thomas Gleixner Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Paolo Bonzini From: Markus Elfring Date: Fri, 26 Aug 2016 13:38:30 +0200 Move the assignment for the local variable "nooutpages" behind the source code for memory allocations by this function. Signed-off-by: Markus Elfring --- arch/cris/arch-v32/drivers/cryptocop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index 26347a2..cd34723 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c @@ -2469,7 +2469,7 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig struct page **inpages = NULL; struct page **outpages = NULL; int noinpages = 0; - int nooutpages = 0; + int nooutpages; struct cryptocop_desc descs[5]; /* Max 5 descriptors are needed, there are three transforms that * can get connected/disconnected on different places in the indata. */ @@ -2695,6 +2695,8 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig err = -ENOMEM; goto free_inpages; } + } else { + nooutpages = 0; } /* Acquire the mm page semaphore. */ -- 2.9.3