diff mbox

[6/13] ASoC: Intel: Delete an unnecessary check before the function call "sst_dma_free"

Message ID 54A93B5A.9050504@users.sourceforge.net (mailing list archive)
State Accepted
Commit 544c55c810a55dcfd2febbc33105642923be9192
Headers show

Commit Message

SF Markus Elfring Jan. 4, 2015, 1:08 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 3 Jan 2015 19:03:55 +0100

The sst_dma_free() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/soc/intel/sst-dsp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mark Brown Jan. 5, 2015, 2:35 p.m. UTC | #1
On Sun, Jan 04, 2015 at 02:08:42PM +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 3 Jan 2015 19:03:55 +0100
> 
> The sst_dma_free() function tests whether its argument is NULL and then
> returns immediately. Thus the test around the call is not needed.

I'm missing aptches 1-5, are there any dependencies?
Takashi Iwai Jan. 5, 2015, 3:18 p.m. UTC | #2
At Mon, 5 Jan 2015 14:35:51 +0000,
Mark Brown wrote:
> 
> On Sun, Jan 04, 2015 at 02:08:42PM +0100, SF Markus Elfring wrote:
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Sat, 3 Jan 2015 19:03:55 +0100
> > 
> > The sst_dma_free() function tests whether its argument is NULL and then
> > returns immediately. Thus the test around the call is not needed.
> 
> I'm missing aptches 1-5, are there any dependencies?

No, all individual fixes.


Takashi
Mark Brown Jan. 5, 2015, 6:22 p.m. UTC | #3
On Mon, Jan 05, 2015 at 04:18:07PM +0100, Takashi Iwai wrote:
> Mark Brown wrote:

> > I'm missing aptches 1-5, are there any dependencies?

> No, all individual fixes.

OK.  SF, in future please always send at least the cover letter to
everyone getting patches in the series so they know what's going on.
Mark Brown Jan. 5, 2015, 7:02 p.m. UTC | #4
On Sun, Jan 04, 2015 at 02:08:42PM +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 3 Jan 2015 19:03:55 +0100
> 
> The sst_dma_free() function tests whether its argument is NULL and then
> returns immediately. Thus the test around the call is not needed.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/intel/sst-dsp.c b/sound/soc/intel/sst-dsp.c
index 86e4108..64e9421 100644
--- a/sound/soc/intel/sst-dsp.c
+++ b/sound/soc/intel/sst-dsp.c
@@ -410,8 +410,7 @@  void sst_dsp_free(struct sst_dsp *sst)
 	if (sst->ops->free)
 		sst->ops->free(sst);
 
-	if (sst->dma)
-		sst_dma_free(sst->dma);
+	sst_dma_free(sst->dma);
 }
 EXPORT_SYMBOL_GPL(sst_dsp_free);