public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sbc: don't dereference sbc pointer if NULL
@ 2009-02-17 20:46 marcandre.lureau
  2009-02-17 21:59 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: marcandre.lureau @ 2009-02-17 20:46 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Marc-André Lureau

From: Marc-André Lureau <marc-andre.lureau@nokia.com>

---
 sbc/sbc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sbc/sbc.c b/sbc/sbc.c
index e2e7c61..a33ed57 100644
--- a/sbc/sbc.c
+++ b/sbc/sbc.c
@@ -985,7 +985,7 @@ int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output,
 	char *ptr;
 	int i, ch, framelen, samples;
 
-	if (!sbc && !input)
+	if (!sbc || !input)
 		return -EIO;
 
 	priv = sbc->priv;
@@ -1053,7 +1053,7 @@ int sbc_encode(sbc_t *sbc, void *input, int input_len, void *output,
 			const uint8_t *pcm, int16_t X[2][SBC_X_BUFFER_SIZE],
 			int nsamples, int nchannels);
 
-	if (!sbc && !input)
+	if (!sbc || !input)
 		return -EIO;
 
 	priv = sbc->priv;
-- 
1.6.1.224.gb56c


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-17 21:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-17 20:46 [PATCH] sbc: don't dereference sbc pointer if NULL marcandre.lureau
2009-02-17 21:59 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox