diff options
author | Vasyl Gomonovych <gomonovych@gmail.com> | 2017-11-27 18:07:08 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-12-04 12:10:38 -0500 |
commit | a8ffa34fa5384feeb44d9a47e1a050ec2f402545 (patch) | |
tree | eb2e83a03b871ae2c46fd9f87140e9321b22286b | |
parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) |
dmaengine: mic_x100_dma: Use PTR_ERR_OR_ZERO()
Fix ptr_ret.cocci warnings:
drivers/dma/mic_x100_dma.c:483:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/mic_x100_dma.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c index 5ba5714d0b7c..94d7bd7d2880 100644 --- a/drivers/dma/mic_x100_dma.c +++ b/drivers/dma/mic_x100_dma.c | |||
@@ -480,9 +480,7 @@ static int mic_dma_setup_irq(struct mic_dma_chan *ch) | |||
480 | to_mbus_hw_ops(ch)->request_threaded_irq(to_mbus_device(ch), | 480 | to_mbus_hw_ops(ch)->request_threaded_irq(to_mbus_device(ch), |
481 | mic_dma_intr_handler, mic_dma_thread_fn, | 481 | mic_dma_intr_handler, mic_dma_thread_fn, |
482 | "mic dma_channel", ch, ch->ch_num); | 482 | "mic dma_channel", ch, ch->ch_num); |
483 | if (IS_ERR(ch->cookie)) | 483 | return PTR_ERR_OR_ZERO(ch->cookie); |
484 | return PTR_ERR(ch->cookie); | ||
485 | return 0; | ||
486 | } | 484 | } |
487 | 485 | ||
488 | static inline void mic_dma_free_irq(struct mic_dma_chan *ch) | 486 | static inline void mic_dma_free_irq(struct mic_dma_chan *ch) |