* [patch] dbri: move dereference after check for NULL
@ 2016-12-01 5:48 Dan Carpenter
2016-12-01 6:14 ` tndave
2016-12-06 17:19 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-12-01 5:48 UTC (permalink / raw)
To: David S. Miller, Tushar Dave
Cc: Takashi Iwai, Jaroslav Kysela, thomas tai, alsa-devel, sparclinux,
kernel-janitors
We accidentally introduced a dereference before the NULL check in
xmit_descs() as part of silencing a GCC warning.
Fixes: 16f46050e709 ("dbri: Fix compiler warning")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Goes into the sparc tree.
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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] dbri: move dereference after check for NULL
2016-12-01 5:48 [patch] dbri: move dereference after check for NULL Dan Carpenter
@ 2016-12-01 6:14 ` tndave
2016-12-06 17:19 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: tndave @ 2016-12-01 6:14 UTC (permalink / raw)
To: Dan Carpenter, David S. Miller
Cc: Takashi Iwai, Jaroslav Kysela, thomas tai, alsa-devel, sparclinux,
kernel-janitors
On 11/30/2016 09:48 PM, Dan Carpenter wrote:
> We accidentally introduced a dereference before the NULL check in
> xmit_descs() as part of silencing a GCC warning.
>
> Fixes: 16f46050e709 ("dbri: Fix compiler warning")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Goes into the sparc tree.
>
> 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);
Thanks for catching this.
-Tushar
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] dbri: move dereference after check for NULL
2016-12-01 5:48 [patch] dbri: move dereference after check for NULL Dan Carpenter
2016-12-01 6:14 ` tndave
@ 2016-12-06 17:19 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-12-06 17:19 UTC (permalink / raw)
To: dan.carpenter
Cc: tushar.n.dave, tiwai, perex, thomas.tai, alsa-devel, sparclinux,
kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 1 Dec 2016 08:48:30 +0300
> We accidentally introduced a dereference before the NULL check in
> xmit_descs() as part of silencing a GCC warning.
>
> Fixes: 16f46050e709 ("dbri: Fix compiler warning")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thanks Dan.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-06 17:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-01 5:48 [patch] dbri: move dereference after check for NULL Dan Carpenter
2016-12-01 6:14 ` tndave
2016-12-06 17:19 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).