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

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

Merge "msm-camera: Validation of input parameter"

parents d3cb2ead cf0e6416
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
/* Copyright (c) 2011-2014, The Linux Foundataion. All rights reserved.
/* Copyright (c) 2011-2014, 2017 The Linux Foundataion. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -394,9 +394,15 @@ int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg,
		pr_err("%s:%d vreg sequence invalid\n", __func__, __LINE__);
		return -EINVAL;
	}

	if (!num_vreg_seq)
		num_vreg_seq = num_vreg;

	if ((cam_vreg == NULL) && num_vreg_seq) {
		pr_err("%s:%d cam_vreg NULL\n", __func__, __LINE__);
		return -EINVAL;
	}

	if (config) {
		for (i = 0; i < num_vreg_seq; i++) {
			if (vreg_seq) {