• A
    [media] exynos-gsc: avoid build warning without CONFIG_OF · aff093d4
    Arnd Bergmann 提交于
    When building the exynos-gsc driver with CONFIG_OF disabled, we get
    a warning about an out-of-bounds access:
    
    drivers/media/platform/exynos-gsc/gsc-core.c: In function 'gsc_probe':
    drivers/media/platform/exynos-gsc/gsc-core.c:1078:34: error: array subscript is above array bounds [-Werror=array-bounds]
    
    This is harmless because the driver will never be used without CONFIG_OF,
    but it's better to avoid the warning anyway. Checking the return value
    of of_alias_get_id() for an error condition is probably a good idea
    anyway, and it makes sure the compiler can verify that we don't get
    into that situation.
    
    Fixes: 26a7ed9c ("[media] exynos-gsc: remove an always false condition")
    Signed-off-by: NArnd Bergmann <arnd@arndb.de>
    Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
    aff093d4
gsc-core.c 30.0 KB