[-next] V4L: media/IR: testing the wrong variable

Message ID 20100723100826.GB26313@bicker (mailing list archive)
State Superseded, archived
Headers

Commit Message

Dan Carpenter July 23, 2010, 10:08 a.m. UTC
  There is a typo here.  We meant to test "rbuf" instead of "drv".  We
already tested "drv" earlier.

Signed-off-by: Dan Carpenter <error27@gmail.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Comments

Jarod Wilson July 23, 2010, 1:16 p.m. UTC | #1
On Fri, Jul 23, 2010 at 12:08:26PM +0200, Dan Carpenter wrote:
> There is a typo here.  We meant to test "rbuf" instead of "drv".  We
> already tested "drv" earlier.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Gah. I swear that got fixed once already... Thanks!

Acked-by: Jarod Wilson <jarod@redhat.com>
  

Patch

diff --git a/drivers/media/IR/ir-lirc-codec.c b/drivers/media/IR/ir-lirc-codec.c
index 178bc5b..870000e 100644
--- a/drivers/media/IR/ir-lirc-codec.c
+++ b/drivers/media/IR/ir-lirc-codec.c
@@ -192,7 +192,7 @@  static int ir_lirc_register(struct input_dev *input_dev)
 		return rc;
 
 	rbuf = kzalloc(sizeof(struct lirc_buffer), GFP_KERNEL);
-	if (!drv)
+	if (!rbuf)
 		goto rbuf_alloc_failed;
 
 	rc = lirc_buffer_init(rbuf, sizeof(int), LIRCBUF_SIZE);