Commit 65946ea
net: dlink: handle dma_map_single() failure properly
There is no error handling for `dma_map_single()` failures.
Add error handling by checking `dma_mapping_error()` and freeing
the `skb` using `dev_kfree_skb()` (process context) when it fails.
Fixes: 1da177e ("Linux-2.6.12-rc2")
Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
Tested-on: D-Link DGE-550T Rev-A3
Suggested-by: Simon Horman <horms@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 3abc0e5 commit 65946ea
1 file changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| 511 | + | |
511 | 512 | | |
512 | 513 | | |
513 | 514 | | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
518 | 522 | | |
519 | 523 | | |
520 | 524 | | |
521 | 525 | | |
522 | 526 | | |
523 | | - | |
524 | | - | |
525 | | - | |
| 527 | + | |
526 | 528 | | |
527 | 529 | | |
528 | 530 | | |
529 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
530 | 539 | | |
531 | 540 | | |
532 | 541 | | |
| |||
0 commit comments