* [PATCH] sound: pci: lx6464es: Remove unneeded variable err
@ 2019-07-10 2:30 Hariprasad Kelam
2019-07-10 9:49 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Hariprasad Kelam @ 2019-07-10 2:30 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Kate Stewart, Hariprasad Kelam,
Allison Randal, Thomas Gleixner, alsa-devel, linux-kernel
This patch fixes below issue reported by coccicheck
sound/pci/lx6464es/lx6464es.c:256:5-8: Unneeded variable: "err". Return
"0" on line 258
We cannot change return value as its registered with snd_pcm_ops->close
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
sound/pci/lx6464es/lx6464es.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c
index 1771a6d..583ca73 100644
--- a/sound/pci/lx6464es/lx6464es.c
+++ b/sound/pci/lx6464es/lx6464es.c
@@ -253,9 +253,8 @@ static int lx_pcm_open(struct snd_pcm_substream *substream)
static int lx_pcm_close(struct snd_pcm_substream *substream)
{
- int err = 0;
dev_dbg(substream->pcm->card->dev, "->lx_pcm_close\n");
- return err;
+ return 0;
}
static snd_pcm_uframes_t lx_pcm_stream_pointer(struct snd_pcm_substream
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sound: pci: lx6464es: Remove unneeded variable err
2019-07-10 2:30 [PATCH] sound: pci: lx6464es: Remove unneeded variable err Hariprasad Kelam
@ 2019-07-10 9:49 ` Takashi Iwai
2019-07-10 9:52 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2019-07-10 9:49 UTC (permalink / raw)
To: Hariprasad Kelam
Cc: alsa-devel, Thomas Gleixner, Kate Stewart, Allison Randal,
Jaroslav Kysela, Takashi Iwai, linux-kernel
On Wed, 10 Jul 2019 04:30:59 +0200,
Hariprasad Kelam wrote:
>
> This patch fixes below issue reported by coccicheck
> sound/pci/lx6464es/lx6464es.c:256:5-8: Unneeded variable: "err". Return
> "0" on line 258
>
> We cannot change return value as its registered with snd_pcm_ops->close
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Applied, thanks.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sound: pci: lx6464es: Remove unneeded variable err
2019-07-10 9:49 ` Takashi Iwai
@ 2019-07-10 9:52 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2019-07-10 9:52 UTC (permalink / raw)
To: Hariprasad Kelam
Cc: alsa-devel, Thomas Gleixner, Kate Stewart, Allison Randal,
Jaroslav Kysela, Takashi Iwai, linux-kernel
On Wed, 10 Jul 2019 11:49:31 +0200,
Takashi Iwai wrote:
>
> On Wed, 10 Jul 2019 04:30:59 +0200,
> Hariprasad Kelam wrote:
> >
> > This patch fixes below issue reported by coccicheck
> > sound/pci/lx6464es/lx6464es.c:256:5-8: Unneeded variable: "err". Return
> > "0" on line 258
> >
> > We cannot change return value as its registered with snd_pcm_ops->close
> >
> > Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
>
> Applied, thanks.
Well, looking at the description above again, I'd drop the text
"We cannot change return value as its registered with
snd_pcm_ops->close"
because this is quite misleading. There is absolutely no need for
changing the function return type.
thanks,
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-10 9:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10 2:30 [PATCH] sound: pci: lx6464es: Remove unneeded variable err Hariprasad Kelam
2019-07-10 9:49 ` Takashi Iwai
2019-07-10 9:52 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).