mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
tegra: cvnas: Fix Cert-C error handling bug
In function nvcvnas_power_off casting nvcvsram_readl from unsigned int to int without checking its value may result in lost or misinterpreted data. Fix this by changing data type of val to u32. CID 427418 Bug 3512545 Change-Id: I8be65b1ca73270a4a0d76380207078da745c7057 Signed-off-by: Sagar Gulab Patil <sagargulabp@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2747340 Reviewed-by: Sachin Nikam <snikam@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
659ad2b6ee
commit
59f352a819
@@ -408,7 +408,7 @@ err_enable_clk:
|
|||||||
|
|
||||||
static int nvcvnas_power_off(struct cvnas_device *cvnas_dev)
|
static int nvcvnas_power_off(struct cvnas_device *cvnas_dev)
|
||||||
{
|
{
|
||||||
int val, i, j;
|
u32 val, i, j;
|
||||||
u32 fcm_pg_seq[] =
|
u32 fcm_pg_seq[] =
|
||||||
{0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFF};
|
{0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFF};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user