linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: peng.hao2@zte.com.cn
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	leoyang.li@nxp.com, julia.lawall@lip6.fr,
	linuxppc-dev@lists.ozlabs.org, wen.yang99@zte.com.cn,
	qiang.zhao@nxp.com
Subject: Re: [RESEND PATCH v5] soc/fsl/qe: fix err handling of ucc_of_parse_tdm
Date: Fri, 04 Jan 2019 12:51:16 -0800 (PST)	[thread overview]
Message-ID: <20190104.125116.1758539198737883869.davem@davemloft.net> (raw)
In-Reply-To: <1546448993-17397-1-git-send-email-peng.hao2@zte.com.cn>

From: Peng Hao <peng.hao2@zte.com.cn>
Date: Thu, 3 Jan 2019 01:09:53 +0800

> From: Wen Yang <wen.yang99@zte.com.cn>
> 
> Currently there are some issues with the ucc_of_parse_tdm function:
> 1, a possible null pointer dereference in ucc_of_parse_tdm,
> detected by the semantic patch deref_null.cocci,
> with the following warning:
> drivers/soc/fsl/qe/qe_tdm.c:177:21-24: ERROR: pdev is NULL but dereferenced.
> 2, dev gets modified, so in any case that devm_iounmap() will fail
> even when the new pdev is valid, because the iomap was done with a
>  different pdev.
> 3, there is no driver bind with the "fsl,t1040-qe-si" or
> "fsl,t1040-qe-siram" device. So allocating resources using devm_*()
> with these devices won't provide a cleanup path for these resources
> when the caller fails.
> 
> This patch fixes them.
> 
> Suggested-by: Li Yang <leoyang.li@nxp.com>
> Suggested-by: Christophe LEROY <christophe.leroy@c-s.fr>
> Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
> Reviewed-by: Peng Hao <peng.hao2@zte.com.cn>

Applied, thanks.

      reply	other threads:[~2019-01-04 20:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02 17:09 [RESEND PATCH v5] soc/fsl/qe: fix err handling of ucc_of_parse_tdm Peng Hao
2019-01-04 20:51 ` David Miller [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=20190104.125116.1758539198737883869.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=julia.lawall@lip6.fr \
    --cc=leoyang.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=peng.hao2@zte.com.cn \
    --cc=qiang.zhao@nxp.com \
    --cc=wen.yang99@zte.com.cn \
    /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).