From: Eugene Teo Date: Fri, 17 Mar 2006 15:32:17 +0000 (+0100) Subject: [ALSA] Fix seq_clientmgr dereferences before NULL check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e64d2e36236175a56fd1d8b2acd784e21bdc7de6;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [ALSA] Fix seq_clientmgr dereferences before NULL check Modules: ALSA sequencer cptr->pool must be non-NULL there, so just the if (cptr->pool) is superfluous. Thanks Takashi. Signed-off-by: Eugene Teo Signed-off-by: Takashi Iwai --- diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index aae6420f5948..bb15d9ee8842 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -1866,8 +1866,7 @@ static int snd_seq_ioctl_get_client_pool(struct snd_seq_client *client, info.output_pool = cptr->pool->size; info.output_room = cptr->pool->room; info.output_free = info.output_pool; - if (cptr->pool) - info.output_free = snd_seq_unused_cells(cptr->pool); + info.output_free = snd_seq_unused_cells(cptr->pool); if (cptr->type == USER_CLIENT) { info.input_pool = cptr->data.user.fifo_pool_size; info.input_free = info.input_pool;