extcon: Make static analyzer happy about union assignment
When assign unions we need to supply non-scalar value, otherwise static analyzer is not happy: CHECK drivers/extcon/extcon.c drivers/extcon/extcon.c:631:22: warning: cast to non-scalar Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
This commit is contained in:
parent
1213a36681
commit
cff7499d7e
1 changed files with 1 additions and 1 deletions
|
@ -628,7 +628,7 @@ int extcon_get_property(struct extcon_dev *edev, unsigned int id,
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int index, ret = 0;
|
int index, ret = 0;
|
||||||
|
|
||||||
*prop_val = (union extcon_property_value)(0);
|
*prop_val = (union extcon_property_value){0};
|
||||||
|
|
||||||
if (!edev)
|
if (!edev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in a new issue