All of lore.kernel.org
 help / color / mirror / Atom feed
* + drivers-media-ir-ene_irc-fix-null-dereference.patch added to -mm tree
@ 2010-09-13 23:23 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2010-09-13 23:23 UTC (permalink / raw)
  To: mm-commits; +Cc: jslaby, maximlevitsky, mchehab


The patch titled
     drivers/media/IR/ene_ir.c: fix NULL dereference
has been added to the -mm tree.  Its filename is
     drivers-media-ir-ene_irc-fix-null-dereference.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: drivers/media/IR/ene_ir.c: fix NULL dereference
From: Jiri Slaby <jslaby@suse.cz>

When 'dev' allocation fails in ene_probe we jump to error label where we
dereference the 'dev'.  Fix it by jumping few lines below.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/media/IR/ene_ir.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/media/IR/ene_ir.c~drivers-media-ir-ene_irc-fix-null-dereference drivers/media/IR/ene_ir.c
--- a/drivers/media/IR/ene_ir.c~drivers-media-ir-ene_irc-fix-null-dereference
+++ a/drivers/media/IR/ene_ir.c
@@ -785,7 +785,7 @@ static int ene_probe(struct pnp_dev *pnp
 	dev = kzalloc(sizeof(struct ene_device), GFP_KERNEL);
 
 	if (!input_dev || !ir_props || !dev)
-		goto error;
+		goto error1;
 
 	/* validate resources */
 	error = -ENODEV;
@@ -899,7 +899,7 @@ error:
 		free_irq(dev->irq, dev);
 	if (dev->hw_io)
 		release_region(dev->hw_io, ENE_MAX_IO);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-13 23:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-13 23:23 + drivers-media-ir-ene_irc-fix-null-dereference.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.