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

Commit fe1474fc authored by Vasko Kalanoski's avatar Vasko Kalanoski Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Free gpio array memory on error



Free gpio array memory in flash driver to prevent
memory leak in error cases.

Change-Id: I7349cbd208f7800df9c070ea97ef20d1f01c6f2a
Signed-off-by: default avatarVasko Kalanoski <vaskok@codeaurora.org>
parent 79fac8c9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -618,7 +618,8 @@ static int32_t msm_flash_get_gpio_dt_data(struct device_node *of_node,
			gpio_array[i] = of_get_gpio(of_node, i);
			if (((int16_t)gpio_array[i]) < 0) {
				pr_err("%s failed %d\n", __func__, __LINE__);
				return -EINVAL;
				rc = -EINVAL;
				goto free_gpio_array;
			}
			CDBG("%s gpio_array[%d] = %d\n", __func__, i,
				gpio_array[i]);