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]
Message-ID: <36267d50-b81b-be17-5050-221d5a560eca@users.sourceforge.net>
Date:   Sat, 20 May 2017 21:13:47 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     Arnd Bergmann <arnd@...db.de>, Jan Kara <jack@...e.cz>,
        Jesper Nilsson <jesper.nilsson@...s.com>,
        Kumar Gala <galak@...nel.crashing.org>,
        Lorenzo Stoakes <lstoakes@...il.com>,
        Michal Hocko <mhocko@...e.com>,
        Timur Tabi <timur@...escale.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 3/5] fsl_hypervisor: Return the success indication only as a
 constant in fsl_hv_open()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 20 May 2017 20:05:19 +0200

* Return a success code without storing it in an intermediate variable.

* Delete the local variable "ret" which became unnecessary with
  this refactoring.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/virt/fsl_hypervisor.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
index 40c5eb64f39b..9e881dc29c6b 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -657,7 +657,6 @@ static int fsl_hv_open(struct inode *inode, struct file *filp)
 {
 	struct doorbell_queue *dbq;
 	unsigned long flags;
-	int ret = 0;
 
 	dbq = kzalloc(sizeof(*dbq), GFP_KERNEL);
 	if (!dbq)
@@ -671,8 +670,7 @@ static int fsl_hv_open(struct inode *inode, struct file *filp)
 	spin_unlock_irqrestore(&db_list_lock, flags);
 
 	filp->private_data = dbq;
-
-	return ret;
+	return 0;
 }
 
 /*
-- 
2.13.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ