public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org
Subject: Re: drivers/staging/greybus/bootrom.c:298:35-39: ERROR: fw is NULL but dereferenced.
Date: Sun, 27 Nov 2016 12:06:33 +0100	[thread overview]
Message-ID: <20161127110633.GA16452@kroah.com> (raw)
In-Reply-To: <201611270743.Rc4TmNre%fengguang.wu@intel.com>

On Sun, Nov 27, 2016 at 07:11:46AM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   a0d60e62ea5c88a9823410e9d0929a513e29dea2
> commit: f44dd184634d401f5cf88a6d8b4a60d5ff4f417f Merge greybus driver tree into 4.8-rc6
> date:   10 weeks ago

This is a false-positive, sorry.

greg k-h

> 
> 
> coccinelle warnings: (new ones prefixed by >>)
> 
> >> drivers/staging/greybus/bootrom.c:298:35-39: ERROR: fw is NULL but dereferenced.
> 
> vim +298 drivers/staging/greybus/bootrom.c
> 
> 90f1b617 drivers/staging/greybus/firmware.c Viresh Kumar 2015-08-12  282  		dev_err(dev, "%s: error allocating response\n", __func__);
> a956d939 drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-05-09  283  		ret = -ENOMEM;
> a956d939 drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-05-09  284  		goto unlock;
> 90f1b617 drivers/staging/greybus/firmware.c Viresh Kumar 2015-08-12  285  	}
> 90f1b617 drivers/staging/greybus/firmware.c Viresh Kumar 2015-08-12  286  
> 90f1b617 drivers/staging/greybus/firmware.c Viresh Kumar 2015-08-12  287  	firmware_response = op->response->payload;
> 98645a9c drivers/staging/greybus/firmware.c Johan Hovold 2015-11-19  288  	memcpy(firmware_response->data, fw->data + offset, size);
> 90f1b617 drivers/staging/greybus/firmware.c Viresh Kumar 2015-08-12  289  
> fc41c2da drivers/staging/greybus/firmware.c Eli Sennesh  2016-01-08  290  	dev_dbg(dev, "responding with firmware (offs = %u, size = %u)\n", offset,
> fc41c2da drivers/staging/greybus/firmware.c Eli Sennesh  2016-01-08  291  		size);
> fc41c2da drivers/staging/greybus/firmware.c Eli Sennesh  2016-01-08  292  
> a956d939 drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-05-09  293  unlock:
> a956d939 drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-05-09  294  	mutex_unlock(&bootrom->mutex);
> a956d939 drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-05-09  295  
> a956d939 drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-05-09  296  queue_work:
> a956d939 drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-05-09  297  	/* Refresh timeout */
> a4293e1d drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-06-22 @298  	if (!ret && (offset + size == fw->size))
> a4293e1d drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-06-22  299  		next_request = NEXT_REQ_READY_TO_BOOT;
> a4293e1d drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-06-22  300  	else
> a4293e1d drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-06-22  301  		next_request = NEXT_REQ_GET_FIRMWARE;
> a4293e1d drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-06-22  302  
> dbb8cfeb drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-06-22  303  	gb_bootrom_set_timeout(bootrom, next_request, NEXT_REQ_TIMEOUT_MS);
> a956d939 drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-05-09  304  
> a956d939 drivers/staging/greybus/bootrom.c  Viresh Kumar 2016-05-09  305  	return ret;
> 90f1b617 drivers/staging/greybus/firmware.c Viresh Kumar 2015-08-12  306  }
> 
> :::::: The code at line 298 was first introduced by commit
> :::::: a4293e1d4e6416477976ee3bd248589d3fc4bb19 greybus: bootrom: Enhance timeout error message
> 
> :::::: TO: Viresh Kumar <viresh.kumar@linaro.org>
> :::::: CC: Greg Kroah-Hartman <gregkh@google.com>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

  reply	other threads:[~2016-11-27 11:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-26 23:11 drivers/staging/greybus/bootrom.c:298:35-39: ERROR: fw is NULL but dereferenced kbuild test robot
2016-11-27 11:06 ` Greg Kroah-Hartman [this message]
2016-11-28  8:24   ` Fengguang Wu
2016-11-28  8:59     ` Julia Lawall
2016-11-28  9:03       ` [kbuild-all] " Fengguang Wu

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=20161127110633.GA16452@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox