mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 22:24:09 +08:00
soundwire: qcom: check of_property_read status
Cppcheck complains: drivers/soundwire/qcom.c:773:6: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] ret = of_property_read_u8_array(np, "qcom,ports-block-pack-mode", ^ The return value is checked for all other cases, not sure why it was missed here. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20210302091122.13952-10-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
3f9c59ef8f
commit
a5943e4fb1
@ -772,6 +772,9 @@ static int qcom_swrm_get_port_config(struct qcom_swrm_ctrl *ctrl)
|
|||||||
|
|
||||||
ret = of_property_read_u8_array(np, "qcom,ports-block-pack-mode",
|
ret = of_property_read_u8_array(np, "qcom,ports-block-pack-mode",
|
||||||
bp_mode, nports);
|
bp_mode, nports);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
for (i = 0; i < nports; i++) {
|
for (i = 0; i < nports; i++) {
|
||||||
ctrl->pconfig[i].si = si[i];
|
ctrl->pconfig[i].si = si[i];
|
||||||
ctrl->pconfig[i].off1 = off1[i];
|
ctrl->pconfig[i].off1 = off1[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user