From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [bug report] mtd: rawnand: allocate dynamically ONFI parameters during detection
Date: Wed, 1 Aug 2018 08:56:43 +0200 [thread overview]
Message-ID: <20180801085643.101c3132@xps13> (raw)
In-Reply-To: <20180731182654.ybi46jqvm5ygfhk7@kili.mountain>
Hi Dan,
Dan Carpenter <dan.carpenter@oracle.com> wrote on Tue, 31 Jul 2018
21:26:54 +0300:
> Hello Miquel Raynal,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch 0ff393463e9c: "mtd: rawnand: allocate dynamically ONFI
> parameters during detection" from Jul 25, 2018, leads to the
> following Smatch complaint:
>
> drivers/mtd/nand/raw/nand_micron.c:93 micron_nand_onfi_init()
> warn: variable dereferenced before check 'p->onfi' (see line 91)
>
> drivers/mtd/nand/raw/nand_micron.c
> 90 struct nand_parameters *p = &chip->parameters;
> 91 struct nand_onfi_vendor_micron *micron = (void *)p->onfi->vendor;
> ^^^^^^^^^^^^^^^
> The code dereferences "p->onfi"
>
> 92
> 93 if (p->onfi) {
That's right, I'll dereference p->onfi only in this block as it's not
used elsewhere.
Thanks,
Miquèl
prev parent reply other threads:[~2018-08-01 6:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 18:26 [bug report] mtd: rawnand: allocate dynamically ONFI parameters during detection Dan Carpenter
2018-08-01 6:56 ` Miquel Raynal [this message]
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=20180801085643.101c3132@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-mtd@lists.infradead.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.