diff options
Diffstat (limited to 'drivers/char/xillybus/xillybus_pcie.c')
-rw-r--r-- | drivers/char/xillybus/xillybus_pcie.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/char/xillybus/xillybus_pcie.c b/drivers/char/xillybus/xillybus_pcie.c index 9418300214e9..dff2d1538164 100644 --- a/drivers/char/xillybus/xillybus_pcie.c +++ b/drivers/char/xillybus/xillybus_pcie.c | |||
@@ -98,7 +98,6 @@ static int xilly_map_single_pci(struct xilly_endpoint *ep, | |||
98 | int pci_direction; | 98 | int pci_direction; |
99 | dma_addr_t addr; | 99 | dma_addr_t addr; |
100 | struct xilly_mapping *this; | 100 | struct xilly_mapping *this; |
101 | int rc; | ||
102 | 101 | ||
103 | this = kzalloc(sizeof(*this), GFP_KERNEL); | 102 | this = kzalloc(sizeof(*this), GFP_KERNEL); |
104 | if (!this) | 103 | if (!this) |
@@ -120,14 +119,7 @@ static int xilly_map_single_pci(struct xilly_endpoint *ep, | |||
120 | 119 | ||
121 | *ret_dma_handle = addr; | 120 | *ret_dma_handle = addr; |
122 | 121 | ||
123 | rc = devm_add_action(ep->dev, xilly_pci_unmap, this); | 122 | return devm_add_action_or_reset(ep->dev, xilly_pci_unmap, this); |
124 | if (rc) { | ||
125 | pci_unmap_single(ep->pdev, addr, size, pci_direction); | ||
126 | kfree(this); | ||
127 | return rc; | ||
128 | } | ||
129 | |||
130 | return 0; | ||
131 | } | 123 | } |
132 | 124 | ||
133 | static struct xilly_endpoint_hardware pci_hw = { | 125 | static struct xilly_endpoint_hardware pci_hw = { |