linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Martin Kepplinger <martink@posteo.de>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	m.chehab@samsung.com
Subject: Re: [PATCH] staging: media: as102: replace custom dprintk() with dev_dbg()
Date: Mon, 4 Aug 2014 12:10:24 +0300	[thread overview]
Message-ID: <20140804091023.GP4856@mwanda> (raw)
In-Reply-To: <1407077661-2411-1-git-send-email-martink@posteo.de>

On Sun, Aug 03, 2014 at 04:54:21PM +0200, Martin Kepplinger wrote:
> @@ -447,6 +457,13 @@ static uint8_t as102_fe_get_code_rate(fe_code_rate_t arg)
>  static void as102_fe_copy_tune_parameters(struct as10x_tune_args *tune_args,
>  			  struct dtv_frontend_properties *params)
>  {
> +	struct dvb_frontend *fe;
> +	struct as102_dev_t *dev;
> +
> +	fe = container_of(params, struct dvb_frontend, dtv_property_cache);
> +	dev = (struct as102_dev_t *) fe->tuner_priv;
> +	if (dev == NULL)
> +		dev_err(&dev->bus_adap.usb_dev->dev, "No device found\n");

NULL dereference in printing error message.  I think smatch or
coccinelle would detect this although I haven't tried either.

This is the typical bug for this kind of patch.

regards,
dan carpenter

  reply	other threads:[~2014-08-04  9:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-03 14:54 [PATCH] staging: media: as102: replace custom dprintk() with dev_dbg() Martin Kepplinger
2014-08-04  9:10 ` Dan Carpenter [this message]
2014-08-04 10:17   ` [PATCHv2] " Martin Kepplinger
2014-08-04 10:40     ` Dan Carpenter
2014-08-04 11:12       ` Joe Perches
2014-08-04 11:13       ` [PATCHv3] " Martin Kepplinger
  -- strict thread matches above, loose matches on Subject: below --
2014-05-17 13:16 [PATCH] " Martin Kepplinger
2014-05-17 13:59 ` Antti Palosaari

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=20140804091023.GP4856@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=martink@posteo.de \
    /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 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).