public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] ALSA: hda/ca0132 - remove the unneeded result variable
@ 2022-09-22 11:28 cgel.zte
  2022-09-22 11:53 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-09-22 11:28 UTC (permalink / raw)
  To: tiwai; +Cc: perex, alsa-devel, linux-kernel, ye xingchen, Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value dsp_allocate_ports() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 sound/pci/hda/patch_ca0132.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 208933792787..9580fe00cbd9 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -2962,7 +2962,6 @@ static int dsp_allocate_ports_format(struct hda_codec *codec,
 			const unsigned short fmt,
 			unsigned int *port_map)
 {
-	int status;
 	unsigned int num_chans;
 
 	unsigned int sample_rate_div = ((get_hdafmt_rate(fmt) >> 0) & 3) + 1;
@@ -2976,9 +2975,7 @@ static int dsp_allocate_ports_format(struct hda_codec *codec,
 
 	num_chans = get_hdafmt_chs(fmt) + 1;
 
-	status = dsp_allocate_ports(codec, num_chans, rate_multi, port_map);
-
-	return status;
+	return dsp_allocate_ports(codec, num_chans, rate_multi, port_map);
 }
 
 /*
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] ALSA: hda/ca0132 - remove the unneeded result variable
  2022-09-22 11:28 [PATCH linux-next] ALSA: hda/ca0132 - remove the unneeded result variable cgel.zte
@ 2022-09-22 11:53 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2022-09-22 11:53 UTC (permalink / raw)
  To: cgel.zte; +Cc: tiwai, perex, alsa-devel, linux-kernel, ye xingchen, Zeal Robot

On Thu, 22 Sep 2022 13:28:46 +0200,
cgel.zte@gmail.com wrote:
> 
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value dsp_allocate_ports() directly instead of storing it in
> another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>

Thanks, applied.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-22 11:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-22 11:28 [PATCH linux-next] ALSA: hda/ca0132 - remove the unneeded result variable cgel.zte
2022-09-22 11:53 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox