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

Commit 92a02135 authored by Ping Li's avatar Ping Li Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: Fix uninitialized return value for compact ioctl function



Initialize the return value before using or returning to user space
to avoid returning uninitialised values to user space.

Change-Id: Iac43744830d725cf69120603befc3e4dd758d031
Signed-off-by: default avatarPing Li <pingli@codeaurora.org>
parent 4df29b7c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 * Copyright (C) 1994 Martin Schaller
 *
 * 2001 - Documented with DocBook
@@ -907,7 +907,7 @@ static int __to_user_lut_cfg_data(
			struct mdp_lut_cfg_data __user *lut_cfg)
{
	uint32_t lut_type;
	int ret;
	int ret = 0;

	if (copy_from_user(&lut_type, &lut_cfg->lut_type,
			sizeof(uint32_t)))