Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: stm32: dmamux: clean up route allocation error labels

Error labels should be named after what they do (and not after wherefrom
they are jumped to).

Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://patch.msgid.link/20251117161258.10679-13-johan@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Johan Hovold and committed by
Vinod Koul
10bf494f b1b590a5

+4 -5
+4 -5
drivers/dma/stm32/stm32-dmamux.c
··· 118 118 spin_unlock_irqrestore(&dmamux->lock, flags); 119 119 dev_err(&pdev->dev, "Run out of free DMA requests\n"); 120 120 ret = -ENOMEM; 121 - goto error_chan_id; 121 + goto err_free_mux; 122 122 } 123 123 set_bit(mux->chan_id, dmamux->dma_inuse); 124 124 spin_unlock_irqrestore(&dmamux->lock, flags); ··· 135 135 dma_spec->np = of_parse_phandle(ofdma->of_node, "dma-masters", i - 1); 136 136 if (!dma_spec->np) { 137 137 dev_err(&pdev->dev, "can't get dma master\n"); 138 - goto error; 138 + goto err_clear_inuse; 139 139 } 140 140 141 141 /* Set dma request */ ··· 167 167 168 168 err_put_dma_spec_np: 169 169 of_node_put(dma_spec->np); 170 - error: 170 + err_clear_inuse: 171 171 clear_bit(mux->chan_id, dmamux->dma_inuse); 172 - 173 - error_chan_id: 172 + err_free_mux: 174 173 kfree(mux); 175 174 err_put_pdev: 176 175 put_device(&pdev->dev);