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: Ping Li <pingli@codeaurora.org>
This commit is contained in:
Ping Li 2015-02-03 12:44:40 -08:00 committed by David Keitel
parent 6304466734
commit 8fb38cdf83

View file

@ -1459,7 +1459,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)))