From: Vinod Koul <vinod.koul@intel.com>
To: Shailendra Verma <shailendra.v@samsung.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
p.shailesh@samsung.com, ashish.kalra@samsung.com,
Shailendra Verma <shailendra.capricorn@gmail.com>
Subject: Re: [PATCH] Dma - Fix possible NULL derefrence.
Date: Mon, 30 Jan 2017 22:19:54 +0530 [thread overview]
Message-ID: <20170130164954.GE19244@localhost> (raw)
In-Reply-To: <1485516359-4232-1-git-send-email-shailendra.v@samsung.com>
On Fri, Jan 27, 2017 at 04:55:59PM +0530, Shailendra Verma wrote:
> of_match_device could return NULL, and so cause a NULL
> pointer dereference later.
Why is this tagged Dma - ....
Please look at he git log for the file before coming up with random tags
Worst part, this patch fails to apply, so which was this generated against?
>
> Signed-off-by: Shailendra Verma <shailendra.v@samsung.com>
> ---
> drivers/dma/mv_xor.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
> index 23f7528..c25b3bb 100644
> --- a/drivers/dma/mv_xor.c
> +++ b/drivers/dma/mv_xor.c
> @@ -1323,7 +1323,10 @@ static int mv_xor_probe(struct platform_device *pdev)
> const struct of_device_id *of_id =
> of_match_device(mv_xor_dt_ids,
> &pdev->dev);
> + if (!of_id) {
> + dev_err(&pdev->dev, "Error: No device match found\n");
> + return -ENODEV;
> + }
> xordev->xor_type = (uintptr_t)of_id->data;
> }
>
> --
> 1.7.9.5
>
--
~Vinod
prev parent reply other threads:[~2017-01-30 16:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170127112626epcas3p137caa1e5fdbf0bb07ae5f057bf819828@epcas3p1.samsung.com>
2017-01-27 11:25 ` [PATCH] Dma - Fix possible NULL derefrence Shailendra Verma
2017-01-30 16:49 ` Vinod Koul [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=20170130164954.GE19244@localhost \
--to=vinod.koul@intel.com \
--cc=ashish.kalra@samsung.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=p.shailesh@samsung.com \
--cc=shailendra.capricorn@gmail.com \
--cc=shailendra.v@samsung.com \
/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.