Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c10c7c9 authored by Ali Ayoub's avatar Ali Ayoub Committed by Roland Dreier
Browse files

IB/sa: Error handling thinko fix



ib_create_send_mad() returns an error code pointer on error, not NULL.

Signed-off-by: default avatarMichael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 339e2640
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -531,7 +531,7 @@ static int alloc_mad(struct ib_sa_query *query, gfp_t gfp_mask)
					    query->sm_ah->pkey_index,
					    0, IB_MGMT_SA_HDR, IB_MGMT_SA_DATA,
					    gfp_mask);
	if (!query->mad_buf) {
	if (IS_ERR(query->mad_buf)) {
		kref_put(&query->sm_ah->ref, free_sm_ah);
		return -ENOMEM;
	}