All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Jarod Wilson <jarod@redhat.com>
Cc: linux-input@vger.kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: imon driver for SoundGraph iMON/Antec Veris IR devices
Date: Tue, 29 Dec 2009 19:01:32 +0200	[thread overview]
Message-ID: <20091229164856.GA29476@bicker> (raw)
In-Reply-To: <20091228051155.GA14301@redhat.com>


I ran smatch (http://repo.or.cz/w/smatch.git) on it and there are
some bugs worth fixing.

drivers/input/misc/imon.c +331 free_imon_context(7) error: dereferencing freed memory 'context'
Move the debug line earlier.

drivers/input/misc/imon.c +1812 imon_probe(216) error: dereferencing undefined:  'context->idev'
drivers/input/misc/imon.c +1876 imon_probe(280) error: dereferencing undefined:  'context->touch'
The allocation func can return NULL.  They probably won't fail in real 
life, but it will slightly annoy every person checking running smatch 
over the entire kernel (me).

drivers/input/misc/imon.c +1979 imon_probe(383) error: double unlock 'mutex:&context->lock'
drivers/input/misc/imon.c +1983 imon_probe(387) error: double unlock 'mutex:&context->lock'
It sometimes unlocks both before and after the goto.

regards,
dan carpenter

  parent reply	other threads:[~2009-12-29 17:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-28  5:11 [PATCH] input: imon driver for SoundGraph iMON/Antec Veris IR devices Jarod Wilson
2009-12-28  9:31 ` Dmitry Torokhov
2009-12-29  5:04   ` Jarod Wilson
2009-12-29 17:01 ` Dan Carpenter [this message]
2009-12-29 18:12   ` Jarod Wilson
  -- strict thread matches above, loose matches on Subject: below --
2009-12-29 22:30 Dmitry Torokhov
2009-12-30  8:02 ` Jarod Wilson
2009-12-30 19:01   ` Jarod Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091229164856.GA29476@bicker \
    --to=error27@gmail.com \
    --cc=jarod@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.