Skip to content

Commit

Permalink
dbri: move dereference after check for NULL
Browse files Browse the repository at this point in the history
We accidentally introduced a dereference before the NULL check in
xmit_descs() as part of silencing a GCC warning.

Fixes: 16f4605 ("dbri: Fix compiler warning")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dan Carpenter authored and davem330 committed Dec 6, 2016
1 parent 88abd82 commit 163117e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/sparc/dbri.c
Original file line number Diff line number Diff line change
Expand Up @@ -1702,14 +1702,15 @@ interrupts are disabled.
static void xmit_descs(struct snd_dbri *dbri)
{
struct dbri_streaminfo *info;
u32 dvma_addr = (u32)dbri->dma_dvma;
u32 dvma_addr;
s32 *cmd;
unsigned long flags;
int first_td;

if (dbri == NULL)
return; /* Disabled */

dvma_addr = (u32)dbri->dma_dvma;
info = &dbri->stream_info[DBRI_REC];
spin_lock_irqsave(&dbri->lock, flags);

Expand Down

0 comments on commit 163117e

Please sign in to comment.