From 5e92500a2faa94332aea314e5132adfc7afc8a1d Mon Sep 17 00:00:00 2001 From: Pravin Date: Mon, 28 Mar 2016 16:52:16 +0530 Subject: platform: tegra: mcerr: Coverity fixes -Change irq variable type as s32 -Change the comparison at __emc_readl to avoid possible array overflow Coverity ID:20443 Coverity ID:20444 Bug 200116059 Change-Id: If1392e09b8967d80c4a5d1eb975cd41dc822f586 Signed-off-by: Pravin Reviewed-on: http://git-master/r/1115960 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam --- include/linux/platform/tegra/tegra18_emc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/platform') diff --git a/include/linux/platform/tegra/tegra18_emc.h b/include/linux/platform/tegra/tegra18_emc.h index abfc43ef9..73686be7b 100644 --- a/include/linux/platform/tegra/tegra18_emc.h +++ b/include/linux/platform/tegra/tegra18_emc.h @@ -148,7 +148,7 @@ static inline u32 __emc_readl(int idx, u32 reg) return 0; if ((idx != EMC_BROADCAST_CHANNEL && idx < 0) || - idx > MAX_CHANNELS) + idx >= MAX_CHANNELS) return 0; if (idx == EMC_BROADCAST_CHANNEL) -- cgit v1.2.2