Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1470688

[PATCH 5/8] cris-cryptocop: Move an assignment for the variable "nooutpages" in cryptocop_ioctl_process()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 5/8] cris-cryptocop: Move an assignment for the variable "nooutpages" in cryptocop_ioctl_process()
Date 2016-08-26 15:00 +0200
Message-ID <saoTL-7aM-9@gated-at.bofh.it> (permalink)
References <qEuGl-43C-5@gated-at.bofh.it> <saoTL-7aM-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
 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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 5/8] cris-cryptocop: Move an assignment for the variable  "nooutpages" in cryptocop_ioctl_process() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-26 15:00 +0200
  Re: [PATCH 5/8] cris-cryptocop: Move an assignment for the variable  "nooutpages" in cryptocop_ioctl_process() Julia Lawall <julia.lawall@lip6.fr> - 2016-08-27 21:10 +0200
    Re: [PATCH 5/8] cris-cryptocop: Move an assignment for the variable  "nooutpages" in cryptocop_ioctl_process() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-28 09:30 +0200
      Re: [PATCH 5/8] cris-cryptocop: Move an assignment for the variable  "nooutpages" in cryptocop_ioctl_process() Julia Lawall <julia.lawall@lip6.fr> - 2016-08-28 12:30 +0200

csiph-web