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

Commit a96f2432 authored by Jong-Guk Im's avatar Jong-Guk Im Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: sensor: Add null check for read buffer" into camera-kernel.lnx.1.0

parents 928edd93 d59ca833
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -241,6 +241,12 @@ static int32_t cam_sensor_get_io_buffer(
	size_t buf_size = 0;
	int32_t rc = 0;

	if (io_cfg == NULL || i2c_settings == NULL) {
		CAM_ERR(CAM_SENSOR,
			"Invalid args, io buf or i2c settings is NULL");
		return -EINVAL;
	}

	if (io_cfg->direction == CAM_BUF_OUTPUT) {
		rc = cam_mem_get_cpu_buf(io_cfg->mem_handle[0],
			&buf_addr, &buf_size);