diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-08-27 18:35:51 +0300 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2018-08-28 11:21:14 +0900 |
commit | cff7499d7eb4196f21fdd1bf643aad12d846ee5d (patch) | |
tree | ecc8f2d12fba91e27fd50c74668bfd87bddd024b | |
parent | 1213a366817299ed91fcb4e738c057a9ac4c8666 (diff) | |
download | linux-cff7499d7eb4196f21fdd1bf643aad12d846ee5d.tar.gz linux-cff7499d7eb4196f21fdd1bf643aad12d846ee5d.tar.bz2 linux-cff7499d7eb4196f21fdd1bf643aad12d846ee5d.zip |
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>
-rw-r--r-- | drivers/extcon/extcon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c index b9d27c8fe57e..c21650a92689 100644 --- a/drivers/extcon/extcon.c +++ b/drivers/extcon/extcon.c @@ -628,7 +628,7 @@ int extcon_get_property(struct extcon_dev *edev, unsigned int id, unsigned long flags; int index, ret = 0; - *prop_val = (union extcon_property_value)(0); + *prop_val = (union extcon_property_value){0}; if (!edev) return -EINVAL; |