projects/linux·commit bc3913a5

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

bc3913a5 · Linus Torvalds <[email protected]> · 2016-12-06 09:24:11 -08:00

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
Commit
bc3913a5378cd0ddefd1dfec6917cc12eb23a946
Parents
da1b466f · 163117e8

Merge commit. Changes below are compared with the first parent: da1b466f.

Changes

1 files changed · +2 −1

FileStatusAddDelContent
sound/sparc/dbri.cmodified+2−1View file

sound/sparc/dbri.c

View file
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 3fe4468..52063b2 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -1702,7 +1702,7 @@ 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;
@@ -1710,6 +1710,7 @@ static void xmit_descs(struct snd_dbri *dbri)
if (dbri == NULL)
return; /* Disabled */
+ dvma_addr = (u32)dbri->dma_dvma;
info = &dbri->stream_info[DBRI_REC];
spin_lock_irqsave(&dbri->lock, flags);