From 2ab5bf67b7c3fe20f1645dadddd28b1881a25c47 Mon Sep 17 00:00:00 2001 From: Gonglei Date: Mon, 11 Aug 2014 21:00:53 +0800 Subject: audio: don't use 'Yoda conditions' imitate nearby code about using '!value' or 'value == NULL' Signed-off-by: Gonglei Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- hw/audio/hda-codec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/audio/hda-codec.c') diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index cbcf521c5e..3c03ff5668 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -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: -- cgit v1.2.3