Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c39dbe24 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs: Add missing kfree for descriptor buffer"

parents e91a1e0f 7fc277e2
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -7504,7 +7504,7 @@ static void ufshcd_set_active_icc_lvl(struct ufs_hba *hba)
		dev_err(hba->dev,
			"%s: Failed reading power descriptor.len = %d ret = %d",
			__func__, buff_len, ret);
		return;
		goto out;
	}

	icc_level = ufshcd_find_max_sup_active_icc_level(hba, desc_buf,
@@ -7518,6 +7518,9 @@ static void ufshcd_set_active_icc_lvl(struct ufs_hba *hba)
		dev_err(hba->dev,
			"%s: Failed configuring bActiveICCLevel = %d ret = %d",
			__func__, icc_level, ret);

out:
	kfree(desc_buf);
}

/**
@@ -7875,7 +7878,7 @@ static int ufshcd_set_dev_ref_clk(struct ufs_hba *hba)

static int ufs_read_device_desc_data(struct ufs_hba *hba)
{
	int err;
	int err = 0;
	u8 *desc_buf = NULL;

	if (hba->desc_size.dev_desc) {
@@ -7889,7 +7892,7 @@ static int ufs_read_device_desc_data(struct ufs_hba *hba)
	}
	err = ufshcd_read_device_desc(hba, desc_buf, hba->desc_size.dev_desc);
	if (err)
		return err;
		goto out;

	/*
	 * getting vendor (manufacturerID) and Bank Index in big endian
@@ -7901,8 +7904,9 @@ static int ufs_read_device_desc_data(struct ufs_hba *hba)
	hba->dev_info.b_device_sub_class =
		desc_buf[DEVICE_DESC_PARAM_DEVICE_SUB_CLASS];
	hba->dev_info.i_product_name = desc_buf[DEVICE_DESC_PARAM_PRDCT_NAME];

	return 0;
out:
	kfree(desc_buf);
	return err;
}

static void ufshcd_init_desc_sizes(struct ufs_hba *hba)