phy: exynos-mipi-video: fix check on array index
authorAntoine Ténart <antoine.tenart@free-electrons.com>
Mon, 12 May 2014 12:56:28 +0000 (14:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Jul 2014 03:11:52 +0000 (20:11 -0700)
commite248558984dc61187b315fc493ad397bbb4c15cb
treef5d15592816243594607328237be5c804ebc8751
parent57a30a41fd5191c6eef3e868e2ae2d365c74b0f2
phy: exynos-mipi-video: fix check on array index

commit 98c3b32229f2685c13436b652b8959c99dfc5a31 upstream.

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>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/phy-exynos-mipi-video.c