Skip to contentSkip to conversation

ALSA: oss: delete self assignment

PATCH In review Dan Carpenter 2 participants 2 messages Feb 6

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: oss: delete self assignment

No need to assign "uctl" to itself. Delete it.

---
 sound/core/oss/mixer_oss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/oss/mixer_oss.c +1 -1
index 69422ab2d808..8d2d46d03301 100644
@@ -792,7 +792,7 @@ static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned
 	struct snd_ctl_elem_info *uinfo __free(kfree) =
 		kzalloc(sizeof(*uinfo), GFP_KERNEL);
 	struct snd_ctl_elem_value *uctl __free(kfree) =
-		uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
+		kzalloc(sizeof(*uctl), GFP_KERNEL);
 	if (uinfo == NULL || uctl == NULL)
 		return -ENOMEM;
 	guard(rwsem_read)(&card->controls_rwsem);
Signature · 1 line
2.51.0
#1 lore raw
Quoted 4 lines · Dan Carpenter

No need to assign "uctl" to itself. Delete it.

Thanks, it's a garbage at the previous fix commit 55f98ece9939 ("ALSA:
oss: Relax __free() variable declarations"). So I applied with a Fixes tag.

Takashi