stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "IB/core: Avoid unnecessary return value check" has been added to the 4.14-stable tree
@ 2017-12-11 21:52 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-12-11 21:52 UTC (permalink / raw)
  To: parav, danielj, dledford, gregkh, leon; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    IB/core: Avoid unnecessary return value check

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ib-core-avoid-unnecessary-return-value-check.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 2e4c85c6edc80fa532b2c7e1eb3597ef4d4bbb8f Mon Sep 17 00:00:00 2001
From: Parav Pandit <parav@mellanox.com>
Date: Thu, 2 Nov 2017 15:22:27 +0200
Subject: IB/core: Avoid unnecessary return value check

From: Parav Pandit <parav@mellanox.com>

commit 2e4c85c6edc80fa532b2c7e1eb3597ef4d4bbb8f upstream.

Since there is nothing done with non zero return value, such check is
avoided.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/core/security.c |   15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

--- a/drivers/infiniband/core/security.c
+++ b/drivers/infiniband/core/security.c
@@ -697,20 +697,13 @@ void ib_mad_agent_security_cleanup(struc
 
 int ib_mad_enforce_security(struct ib_mad_agent_private *map, u16 pkey_index)
 {
-	int ret;
-
 	if (map->agent.qp->qp_type == IB_QPT_SMI && !map->agent.smp_allowed)
 		return -EACCES;
 
-	ret = ib_security_pkey_access(map->agent.device,
-				      map->agent.port_num,
-				      pkey_index,
-				      map->agent.security);
-
-	if (ret)
-		return ret;
-
-	return 0;
+	return ib_security_pkey_access(map->agent.device,
+				       map->agent.port_num,
+				       pkey_index,
+				       map->agent.security);
 }
 
 #endif /* CONFIG_SECURITY_INFINIBAND */


Patches currently in stable-queue which might be from parav@mellanox.com are

queue-4.14/ib-core-avoid-unnecessary-return-value-check.patch
queue-4.14/ib-core-only-enforce-security-for-infiniband.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-11 21:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-11 21:52 Patch "IB/core: Avoid unnecessary return value check" has been added to the 4.14-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).