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

Commit 5eb63af5 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs: ice: propagate memeory allocation failure error"

parents 645bc65b 6176d75d
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ int ufs_qcom_ice_init(struct ufs_qcom_host *qcom_host)
	if (!ice_workqueue) {
		dev_err(ufs_dev, "%s: workqueue allocation failed.\n",
			__func__);
		err = -ENOMEM;
		goto out;
	}
	INIT_WORK(&qcom_host->ice_cfg_work, ufs_qcom_ice_cfg_work);
@@ -285,6 +286,20 @@ int ufs_qcom_ice_req_setup(struct ufs_qcom_host *qcom_host,
			 * propagate so it will be re-queued.
			 */
			if (err == -EAGAIN) {
				if (!ice_workqueue) {
					dev_err(qcom_host->hba->dev,
						"%s: error %d workqueue NULL\n",
						__func__, err);
					/*
					 * over write the error code to halt
					 * the request from upper layer as
					 * system is possibly in low memory
					 * state. Give system a chance to
					 * recover and reinitialize ice driver.
					 */
					return -EINVAL;
				}

				dev_dbg(qcom_host->hba->dev,
					"%s: scheduling task for ice setup\n",
					__func__);
@@ -409,6 +424,19 @@ int ufs_qcom_ice_cfg_start(struct ufs_qcom_host *qcom_host,
			 * propagate so it will be re-queued.
			 */
			if (err == -EAGAIN) {
				if (!ice_workqueue) {
					dev_err(qcom_host->hba->dev,
						"%s: error %d workqueue NULL\n",
						__func__, err);
					/*
					 * over write the error code to halt
					 * the request from upper layer as
					 * system is possibly in low memory
					 * state. Give system a chance to
					 * recover and reinitialize ice driver.
					 */
					return -EINVAL;
				}

				dev_dbg(qcom_host->hba->dev,
					"%s: scheduling task for ice setup\n",