[tiwai-sound:for-next 34/51] sound/usb/mixer_scarlett2.c:3690 scarlett2_ag_target_ctl_get() error: uninitialized symbol 'err'.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next head: 32cb23a0f911317cdb5030035e49a204aa86fef5 commit: e30ea5340c25d41484d551f61d8c93106989019b [34/51] ALSA: scarlett2: Add autogain target controls config: csky-randconfig-r081-20240420 (https://download.01.org/0day-ci/archive/20240420/202404201509.mWdaL3xF-lkp@i...) compiler: csky-linux-gcc (GCC) 13.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Reported-by: Dan Carpenter dan.carpenter@linaro.org | Closes: https://lore.kernel.org/r/202404201509.mWdaL3xF-lkp@intel.com/
New smatch warnings: sound/usb/mixer_scarlett2.c:3690 scarlett2_ag_target_ctl_get() error: uninitialized symbol 'err'.
vim +/err +3690 sound/usb/mixer_scarlett2.c
e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3665 static int scarlett2_ag_target_ctl_get( e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3666 struct snd_kcontrol *kctl, struct snd_ctl_elem_value *ucontrol) e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3667 { e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3668 struct usb_mixer_elem_info *elem = kctl->private_data; e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3669 struct usb_mixer_interface *mixer = elem->head.mixer; e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3670 struct scarlett2_data *private = mixer->private_data; e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3671 int err; e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3672 e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3673 mutex_lock(&private->data_mutex); e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3674 e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3675 if (private->hwdep_in_use) { e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3676 err = -EBUSY; e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3677 goto unlock; e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3678 } e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3679 e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3680 if (private->autogain_updated) { e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3681 err = scarlett2_update_autogain(mixer); e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3682 if (err < 0) e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3683 goto unlock; e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3684 }
err uninitialized on else path.
e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3685 e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3686 ucontrol->value.integer.value[0] = private->ag_targets[elem->control]; e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3687 e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3688 unlock: e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3689 mutex_unlock(&private->data_mutex); e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 @3690 return err; e30ea5340c25d41 Geoffrey D. Bennett 2024-03-13 3691 }
participants (1)
-
Dan Carpenter