Merge "drivers: dcvs: memlat: check return value of devm_protocol_get"

This commit is contained in:
qctecmdr 2022-11-12 07:59:21 -08:00 committed by Gerrit - the friendly Code Review server
commit f852a8b67d

View File

@ -1427,8 +1427,8 @@ int cpucp_memlat_init(struct scmi_device *sdev)
return -EINVAL; return -EINVAL;
ops = sdev->handle->devm_protocol_get(sdev, SCMI_PROTOCOL_MEMLAT, &ph); ops = sdev->handle->devm_protocol_get(sdev, SCMI_PROTOCOL_MEMLAT, &ph);
if (!ops) if (IS_ERR(ops))
return -ENODEV; return PTR_ERR(ops);
mutex_lock(&memlat_lock); mutex_lock(&memlat_lock);
memlat_data->ph = ph; memlat_data->ph = ph;