From: Julia Lawall <julia.lawall@lip6.fr>
To: Jean-Christophe Trotin <jean-christophe.trotin@st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: question about hva_hw_probe
Date: Thu, 10 Nov 2016 22:51:21 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1611102242470.1970@hadrien> (raw)
The function hva_hw_probe in the file
drivers/media/platform/sti/hva/hva-hw.c contains the following code:
/* get memory for esram */
esram = platform_get_resource(pdev, IORESOURCE_MEM, 1);
if (IS_ERR_OR_NULL(esram)) {
dev_err(dev, "%s failed to get esram\n", HVA_PREFIX);
return PTR_ERR(esram);
}
hva->esram_addr = esram->start;
hva->esram_size = resource_size(esram);
platform_get_resource only returns NULL on failure, so the test of
IS_ERR_OR_NULL doesn't look appropriate. Nor does the return value of
PTR_ERR(esram), which will be 0 on a NULL result. But I wondered if it
was intended to have a call to devm_ioremap_resource between the
platform_get_resource and the IS_ERR_OR_NULL test (which should be just
IS_ERR; likewise for the call just above)?
thanks,
julia
reply other threads:[~2016-11-10 21:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=alpine.DEB.2.20.1611102242470.1970@hadrien \
--to=julia.lawall@lip6.fr \
--cc=christophe.jaillet@wanadoo.fr \
--cc=jean-christophe.trotin@st.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@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
all inboxes | Powered by JetHome®