diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-03-26 15:06:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-04-04 07:36:28 -0400 |
commit | dc9f65cf9aea13167bb930d118dbd31ef6f03180 (patch) | |
tree | 1ed625026402aeceadb5c1636a3a5a59c4586fde /drivers/staging/media | |
parent | 8b1a2468cf8afcf2f2e0a113a32bef4a42298cff (diff) |
media: staging: atomisp: avoid a warning if 32 bits build
Checking if a size_t value is bigger than ULONG_INT only makes
sense if building on 64 bits, as warned by:
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:697 gmin_get_config_var() warn: impossible condition '(*out_len > (~0)) => (0-u32max > u32max)'
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c index be0c5e11e86b..3283c1b05d6a 100644 --- a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c +++ b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c @@ -693,9 +693,11 @@ static int gmin_get_config_var(struct device *dev, const char *var, for (i = 0; i < sizeof(var8) && var8[i]; i++) var16[i] = var8[i]; +#ifdef CONFIG_64BIT /* To avoid owerflows when calling the efivar API */ if (*out_len > ULONG_MAX) return -EINVAL; +#endif /* Not sure this API usage is kosher; efivar_entry_get()'s * implementation simply uses VariableName and VendorGuid from |