diff mbox

[1/2] iw_cxgb4: call dev_put() on l2t allocation failure

Message ID c1b639ca7d71ee034e334b4400ff0bae3ba58c47.1472241953.git.swise@opengridcomputing.com (mailing list archive)
State Superseded
Headers show

Commit Message

Steve Wise Aug. 26, 2016, 3:27 p.m. UTC
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
---
 drivers/infiniband/hw/cxgb4/cm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Steve Wise Aug. 29, 2016, 7:25 p.m. UTC | #1
Hey Doug, I was hoping these two could make 4.8-rc.  Particularly patch 2/2.

Steve.


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Doug Ledford Sept. 2, 2016, 2:09 p.m. UTC | #2
On 8/29/2016 3:25 PM, Steve Wise wrote:
> Hey Doug, I was hoping these two could make 4.8-rc.  Particularly patch 2/2.
> 
> Steve.
> 
> 

Hi Steve,

You've submitted these both individually and as part of a larger nvme
patchset.  You should know that I generally ignore nvme patch sets (I
have enough stuff to review), I just happened to catch it this time.
Submitting these both ways is likely to cause problems down the road,
including getting me yelled at by Linus when the same patches come from
two different places.  Please try to avoid that.

Now, in regards to these two patches, how are you wanting to proceed?
Steve Wise Sept. 2, 2016, 2:24 p.m. UTC | #3
> 
> On 8/29/2016 3:25 PM, Steve Wise wrote:
> > Hey Doug, I was hoping these two could make 4.8-rc.  Particularly patch
> 2/2.
> >
> > Steve.
> >
> >
> 
> Hi Steve,
> 
> You've submitted these both individually and as part of a larger nvme
> patchset.  You should know that I generally ignore nvme patch sets (I
> have enough stuff to review), I just happened to catch it this time.
> Submitting these both ways is likely to cause problems down the road,
> including getting me yelled at by Linus when the same patches come from
> two different places.  Please try to avoid that.
> 
> Now, in regards to these two patches, how are you wanting to proceed?
> 

Sorry about that.  My screw up.   I should have just CCed linux-rdma and you
on the original nvme series as it progressed, instead of posting the
iw_cxgb4 patches to linux-rdma separately.  In v4 of the nvme series, which
CCed you and linux-rdma,  I propose that Sagi merge these through the
nvme-fabrics.  I haven't heard back from him on that yet.   So I want to
wait until we hear from him before proceeding.  

Thanks,

Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Doug Ledford Sept. 2, 2016, 5:15 p.m. UTC | #4
On 9/2/2016 10:24 AM, Steve Wise wrote:
>>
>> On 8/29/2016 3:25 PM, Steve Wise wrote:
>>> Hey Doug, I was hoping these two could make 4.8-rc.  Particularly patch
>> 2/2.
>>>
>>> Steve.
>>>
>>>
>>
>> Hi Steve,
>>
>> You've submitted these both individually and as part of a larger nvme
>> patchset.  You should know that I generally ignore nvme patch sets (I
>> have enough stuff to review), I just happened to catch it this time.
>> Submitting these both ways is likely to cause problems down the road,
>> including getting me yelled at by Linus when the same patches come from
>> two different places.  Please try to avoid that.
>>
>> Now, in regards to these two patches, how are you wanting to proceed?
>>
> 
> Sorry about that.  My screw up.   I should have just CCed linux-rdma and you
> on the original nvme series as it progressed, instead of posting the
> iw_cxgb4 patches to linux-rdma separately.  In v4 of the nvme series, which
> CCed you and linux-rdma,  I propose that Sagi merge these through the
> nvme-fabrics.  I haven't heard back from him on that yet.   So I want to
> wait until we hear from him before proceeding.  

Your call.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index b6a953a..434a7fb 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -2117,8 +2117,10 @@  static int import_ep(struct c4iw_ep *ep, int iptype, __u8 *peer_ip,
 		}
 		ep->l2t = cxgb4_l2t_get(cdev->rdev.lldi.l2t,
 					n, pdev, rt_tos2priority(tos));
-		if (!ep->l2t)
+		if (!ep->l2t) {
+			dev_put(pdev);
 			goto out;
+		}
 		ep->mtu = pdev->mtu;
 		ep->tx_chan = cxgb4_port_chan(pdev);
 		ep->smac_idx = cxgb4_tp_smt_idx(adapter_type,