提交 c2d18126 编写于 作者: W Wei Yongjun 提交者: Greg Kroah-Hartman

usb: typec: ucsi: ccg: fix missing unlock on error in ccg_cmd_write_flash_row()

Add the missing unlock before return from function ccg_cmd_write_flash_row()
in the error handling case.

Fixes: 5c9ae5a8 ("usb: typec: ucsi: ccg: add firmware flashing support")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Acked-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5f2c54e7
......@@ -631,6 +631,7 @@ ccg_cmd_write_flash_row(struct ucsi_ccg *uc, u16 row,
ret = i2c_master_send(client, buf, CCG4_ROW_SIZE + 2);
if (ret != CCG4_ROW_SIZE + 2) {
dev_err(uc->dev, "REG_FLASH_RW_MEM write fail %d\n", ret);
mutex_unlock(&uc->lock);
return ret < 0 ? ret : -EIO;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册