From: Heikki Krogerus <[email protected]>

commit a29d56c2ed24ad33062bfdafdec9e34149715320 upstream.

Fix smatch error:
drivers/usb/typec/ucsi/ucsi_ccg.c:975 ccg_fw_update() error: uninitialized 
symbol 'err'.

Fixes: 5c9ae5a87573 ("usb: typec: ucsi: ccg: add firmware flashing support")
Cc: [email protected]
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Heikki Krogerus <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/typec/ucsi/ucsi_ccg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -963,7 +963,7 @@ release_fw:
  
******************************************************************************/
 static int ccg_fw_update(struct ucsi_ccg *uc, enum enum_flash_mode flash_mode)
 {
-       int err;
+       int err = 0;
 
        while (flash_mode != FLASH_NOT_NEEDED) {
                err = do_flash(uc, flash_mode);


Reply via email to