.. | .. |
---|
104 | 104 | int required_slots = (size / DMA_SLOT_SIZE) |
---|
105 | 105 | + 1 * (size % DMA_SLOT_SIZE != 0); |
---|
106 | 106 | |
---|
| 107 | + if (!dev->ishtp_dma_tx_map) { |
---|
| 108 | + dev_err(dev->devc, "Fail to allocate Tx map\n"); |
---|
| 109 | + return NULL; |
---|
| 110 | + } |
---|
| 111 | + |
---|
107 | 112 | spin_lock_irqsave(&dev->ishtp_dma_tx_lock, flags); |
---|
108 | 113 | for (i = 0; i <= (dev->ishtp_dma_num_slots - required_slots); i++) { |
---|
109 | 114 | free = 1; |
---|
.. | .. |
---|
150 | 155 | return; |
---|
151 | 156 | } |
---|
152 | 157 | |
---|
| 158 | + if (!dev->ishtp_dma_tx_map) { |
---|
| 159 | + dev_err(dev->devc, "Fail to allocate Tx map\n"); |
---|
| 160 | + return; |
---|
| 161 | + } |
---|
| 162 | + |
---|
153 | 163 | i = (msg_addr - dev->ishtp_host_dma_tx_buf) / DMA_SLOT_SIZE; |
---|
154 | 164 | spin_lock_irqsave(&dev->ishtp_dma_tx_lock, flags); |
---|
155 | 165 | for (j = 0; j < acked_slots; j++) { |
---|