From: Laura Abbott <labbott@redhat.com>
To: Olli Salonen <olli.salonen@iki.fi>,
Laura Abbott <labbott@fedoraproject.org>
Cc: Antti Palosaari <crope@iki.fi>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
linux-media <linux-media@vger.kernel.org>,
linux-kernel@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH 2/2] si2157: Bounds check firmware
Date: Mon, 5 Oct 2015 15:28:29 -0700 [thread overview]
Message-ID: <5612F98D.4020000@redhat.com> (raw)
In-Reply-To: <CAAZRmGxi5ZZWEBKU3s0dfkqN1kdx1nYjguorcMpRv9_cVb4A7Q@mail.gmail.com>
On 10/05/2015 03:24 PM, Olli Salonen wrote:
> Hi Laura,
>
> While the patch itself does what it says, the return code for the
> si2157_init will be 0 even if there's a faulty firmware file. Wouldn't
> it be better to set the return code as -EINVAL like done a few lines
> earlier in the code (see below)?
>
> if (fw->size % 17 != 0) {
> dev_err(&client->dev, "firmware file '%s' is invalid\n",
> fw_name);
> ret = -EINVAL;
> goto err_release_firmware;
> }
>
> Cheers,
> -olli
>
Right, I'll update with v2
next prev parent reply other threads:[~2015-10-05 22:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 0:10 [PATCH 1/2] si2168: Bounds check firmware Laura Abbott
2015-09-30 0:10 ` [PATCH 2/2] si2157: " Laura Abbott
2015-10-05 22:24 ` Olli Salonen
2015-10-05 22:28 ` Laura Abbott [this message]
2015-10-05 22:33 ` [PATCHv2] " Laura Abbott
2015-10-08 10:40 ` Olli Salonen
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=5612F98D.4020000@redhat.com \
--to=labbott@redhat.com \
--cc=crope@iki.fi \
--cc=labbott@fedoraproject.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=olli.salonen@iki.fi \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).