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

Commit dd1753cd 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: ice: propagate memeory allocation failure error"

parents 3ea68fdf 6b6d1baa
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -231,6 +231,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);
@@ -286,6 +287,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__);
@@ -405,6 +420,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",