提交 d1670b20 编写于 作者: K Kővágó, Zoltán 提交者: Gerd Hoffmann

audio: fix parameter dereference before NULL check

This should fix Coverity issues CID 1405305 and 1405301.
Signed-off-by: NKővágó, Zoltán <DirtY.iCE.hu@gmail.com>
Message-id: 0eadcc88b8421bb86ce2d68ac70517f920c3ad6c.1568157545.git.DirtY.iCE.hu@gmail.com
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 f22f553e
......@@ -425,8 +425,8 @@ SW *glue (AUD_open_, TYPE) (
struct audsettings *as
)
{
AudioState *s = card->state;
AudiodevPerDirectionOptions *pdo = glue(audio_get_pdo_, TYPE)(s->dev);
AudioState *s;
AudiodevPerDirectionOptions *pdo;
if (audio_bug(__func__, !card || !name || !callback_fn || !as)) {
dolog ("card=%p name=%p callback_fn=%p as=%p\n",
......@@ -434,6 +434,9 @@ SW *glue (AUD_open_, TYPE) (
goto fail;
}
s = card->state;
pdo = glue(audio_get_pdo_, TYPE)(s->dev);
ldebug ("open %s, freq %d, nchannels %d, fmt %d\n",
name, as->freq, as->nchannels, as->fmt);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册