diff mbox

cxgb4i: Add a missing call to neigh_release

Message ID 20161119174214.20241-1-lambert.quentin@gmail.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Quentin Lambert Nov. 19, 2016, 5:42 p.m. UTC
Most error branches following the call to dst_neigh_lookup contain
a call to neigh_release. This patch add these calls where they are
missing.

This issue was found with Hector.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>

---
 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Martin K. Petersen Nov. 29, 2016, 4:48 p.m. UTC | #1
>>>>> "Quentin" == Quentin Lambert <lambert.quentin@gmail.com> writes:

Quentin> Most error branches following the call to dst_neigh_lookup
Quentin> contain a call to neigh_release. This patch add these calls
Quentin> where they are missing.

Varun: Please review!
Varun Prakash Nov. 30, 2016, 11:19 a.m. UTC | #2
On Tue, Nov 29, 2016 at 10:18:09PM +0530, Martin K. Petersen wrote:
> >>>>> "Quentin" == Quentin Lambert <lambert.quentin@gmail.com> writes:
> 
> Quentin> Most error branches following the call to dst_neigh_lookup
> Quentin> contain a call to neigh_release. This patch add these calls
> Quentin> where they are missing.
> 
> Varun: Please review!
> 
Looks good.

Acked-by: Varun Prakash <varun@chelsio.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Martin K. Petersen Nov. 30, 2016, 4:37 p.m. UTC | #3
>>>>> "Quentin" == Quentin Lambert <lambert.quentin@gmail.com> writes:

Quentin> Most error branches following the call to dst_neigh_lookup
Quentin> contain a call to neigh_release. This patch add these calls
Quentin> where they are missing.

Applied to 4.10/scsi-queue.
diff mbox

Patch

--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -1410,7 +1410,7 @@  static int init_act_open(struct cxgbi_so
 	csk->atid = cxgb4_alloc_atid(lldi->tids, csk);
 	if (csk->atid < 0) {
 		pr_err("%s, NO atid available.\n", ndev->name);
-		return -EINVAL;
+		goto rel_resource_without_clip;
 	}
 	cxgbi_sock_set_flag(csk, CTPF_HAS_ATID);
 	cxgbi_sock_get(csk);