mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
audio: don't use 'Yoda conditions'
imitate nearby code about using '!value' or 'value == NULL' Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
d0657b2aab
commit
2ab5bf67b7
3 changed files with 6 additions and 5 deletions
|
@ -489,8 +489,9 @@ static int hda_audio_init(HDACodecDevice *hda, const struct desc_codec *desc)
|
|||
for (i = 0; i < a->desc->nnodes; i++) {
|
||||
node = a->desc->nodes + i;
|
||||
param = hda_codec_find_param(node, AC_PAR_AUDIO_WIDGET_CAP);
|
||||
if (NULL == param)
|
||||
if (param == NULL) {
|
||||
continue;
|
||||
}
|
||||
type = (param->val & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
|
||||
switch (type) {
|
||||
case AC_WID_AUD_OUT:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue