Commit bc3913a5 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc fix from David Miller:
 "A use-before-NULL-check from Dan Carpenter"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  dbri: move dereference after check for NULL
parents da1b466f 163117e8
...@@ -1702,7 +1702,7 @@ interrupts are disabled. ...@@ -1702,7 +1702,7 @@ interrupts are disabled.
static void xmit_descs(struct snd_dbri *dbri) static void xmit_descs(struct snd_dbri *dbri)
{ {
struct dbri_streaminfo *info; struct dbri_streaminfo *info;
u32 dvma_addr = (u32)dbri->dma_dvma; u32 dvma_addr;
s32 *cmd; s32 *cmd;
unsigned long flags; unsigned long flags;
int first_td; int first_td;
...@@ -1710,6 +1710,7 @@ static void xmit_descs(struct snd_dbri *dbri) ...@@ -1710,6 +1710,7 @@ static void xmit_descs(struct snd_dbri *dbri)
if (dbri == NULL) if (dbri == NULL)
return; /* Disabled */ return; /* Disabled */
dvma_addr = (u32)dbri->dma_dvma;
info = &dbri->stream_info[DBRI_REC]; info = &dbri->stream_info[DBRI_REC];
spin_lock_irqsave(&dbri->lock, flags); spin_lock_irqsave(&dbri->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment