From: s.nawrocki@samsung•com (Sylwester Nawrocki)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] phy: exynos-mipi-video: fix check on array index
Date: Mon, 12 May 2014 17:07:23 +0200 [thread overview]
Message-ID: <5370E3AB.7090306@samsung.com> (raw)
In-Reply-To: <1399899388-13101-1-git-send-email-antoine.tenart@free-electrons.com>
On 12/05/14 14:56, Antoine T?nart wrote:
> The phys array is of size EXYNOS_MIPI_PHYS_NUM. Trying to access the
> index EXYNOS_MIPI_PHYS_NUM should return an error.
>
> Fixes: 069d2e26e9d6 "phy: Add driver for Exynos MIPI CSIS/DSIM DPHYs"
>
> Signed-off-by: Antoine T?nart <antoine.tenart@free-electrons•com>
Thanks for the fix,
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung•com>
> ---
> drivers/phy/phy-exynos-mipi-video.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/phy-exynos-mipi-video.c b/drivers/phy/phy-exynos-mipi-video.c
> index 7f139326a642..ff026689358c 100644
> --- a/drivers/phy/phy-exynos-mipi-video.c
> +++ b/drivers/phy/phy-exynos-mipi-video.c
> @@ -101,7 +101,7 @@ static struct phy *exynos_mipi_video_phy_xlate(struct device *dev,
> {
> struct exynos_mipi_video_phy *state = dev_get_drvdata(dev);
>
> - if (WARN_ON(args->args[0] > EXYNOS_MIPI_PHYS_NUM))
> + if (WARN_ON(args->args[0] >= EXYNOS_MIPI_PHYS_NUM))
> return ERR_PTR(-ENODEV);
>
> return state->phys[args->args[0]].phy;
prev parent reply other threads:[~2014-05-12 15:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 12:56 [PATCH] phy: exynos-mipi-video: fix check on array index Antoine Ténart
2014-05-12 15:07 ` Sylwester Nawrocki [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=5370E3AB.7090306@samsung.com \
--to=s.nawrocki@samsung$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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