mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
dbri: move dereference after check for NULL
We accidentally introduced a dereference before the NULL check in
xmit_descs() as part of silencing a GCC warning.
Fixes: 16f46050e7
("dbri: Fix compiler warning")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
88abd8249e
commit
163117e8d4
@ -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)
|
|||||||
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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user