scsi: cxgb4i: Add a missing call to neigh_release
authorQuentin Lambert <lambert.quentin@gmail.com>
Sat, 19 Nov 2016 17:42:14 +0000 (18:42 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 30 Nov 2016 16:36:31 +0000 (11:36 -0500)
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>
Acked-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c

index 0039bebaa9e24407bc00650fe0906a60f05247af..688fde61d12aa3646bc50acc75b448c3362d935e 100644 (file)
@@ -1410,7 +1410,7 @@ static int init_act_open(struct cxgbi_sock *csk)
        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);