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

Configure Feed

Select the types of activity you want to include in your feed.

spi: fsl-dspi: A couple of error handling

Merge series from andy.shevchenko@gmail.com:

A couple of error handling improvements here:
- unshadowing error code from dmaengine_slave_config()
- making error messages uniform

+5 -10
+5 -10
drivers/spi/spi-fsl-dspi.c
··· 502 502 return -ENOMEM; 503 503 504 504 dma->chan_rx = dma_request_chan(dev, "rx"); 505 - if (IS_ERR(dma->chan_rx)) { 506 - return dev_err_probe(dev, PTR_ERR(dma->chan_rx), 507 - "rx dma channel not available\n"); 508 - } 505 + if (IS_ERR(dma->chan_rx)) 506 + return dev_err_probe(dev, PTR_ERR(dma->chan_rx), "rx dma channel not available\n"); 509 507 510 508 dma->chan_tx = dma_request_chan(dev, "tx"); 511 509 if (IS_ERR(dma->chan_tx)) { 512 - ret = PTR_ERR(dma->chan_tx); 513 - dev_err_probe(dev, ret, "tx dma channel not available\n"); 510 + ret = dev_err_probe(dev, PTR_ERR(dma->chan_tx), "tx dma channel not available\n"); 514 511 goto err_tx_channel; 515 512 } 516 513 ··· 538 541 cfg.direction = DMA_DEV_TO_MEM; 539 542 ret = dmaengine_slave_config(dma->chan_rx, &cfg); 540 543 if (ret) { 541 - dev_err(dev, "can't configure rx dma channel\n"); 542 - ret = -EINVAL; 544 + dev_err_probe(dev, ret, "can't configure rx dma channel\n"); 543 545 goto err_slave_config; 544 546 } 545 547 546 548 cfg.direction = DMA_MEM_TO_DEV; 547 549 ret = dmaengine_slave_config(dma->chan_tx, &cfg); 548 550 if (ret) { 549 - dev_err(dev, "can't configure tx dma channel\n"); 550 - ret = -EINVAL; 551 + dev_err_probe(dev, ret, "can't configure tx dma channel\n"); 551 552 goto err_slave_config; 552 553 } 553 554