net: Fix Neptune ethernet driver to check dma mapping error
Subsystems (2)
PATCH 1/1 net: Fix Neptune ethernet driver to check dma mapping error
Request for testing, since I don't have the hardware to test.
--------------------------------------------------------------------
Fix Neptune ethernet driver to check dma mapping error after map_page() interface returns.
--- drivers/net/ethernet/sun/niu.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/sun/niu.c +4 -0
@@ -3335,6 +3335,10 @@ static int niu_rbr_add_page(struct niu *np, struct rx_ring_info *rp, addr = np->ops->map_page (np->device, page,0 ,PAGE_SIZE ,DMA_FROM_DEVICE ); +if (!addr) { +__free_page (page); +return -ENOMEM ; + }niu_hash_page (rp, page, addr);if (rp->rbr_blocks_per_page >1 )
Signature · 1 line
1.7.9.5
David Miller
maintainerFrom: Shuah Khan <[email protected]>
Date: Fri, 20 Jul 2012 15:27:59 -0600
Quoted 1 line
Request for testing, since I don't have the hardware to test.
This is not how you post a patch.
Quoted 1 line
--------------------------------------------------------------------
When you put those "---..." there, GIT is going to eliminate everything afterwards from the commit mesage when I apply this. Yet afterwards is what your commit message actually is.
You therefore should do things the other way around, provide the commit message text, then the "---..." line, then your comments you don't want in the final commit message.
Quoted 9 lines · David Miller
From: Shuah Khan <[email protected]>
Date: Fri, 20 Jul 2012 15:27:59 -0600Quoted 1 line
Request for testing, since I don't have the hardware to test.
This is not how you post a patch.
Quoted 1 line
--------------------------------------------------------------------
Quoted 7 lines
When you put those "---..." there, GIT is going to eliminate everything afterwards from the commit mesage when I apply this. Yet afterwards is what your commit message actually is.
You therefore should do things the other way around, provide the commit message text, then the "---..." line, then your comments you don't want in the final commit message.
Thanks. I had it reversed in my head for some reason. Maybe not enough coffee :) Will resend the patch now.
-- Shuah