qbt1000: Initialize drvdata structure before usage

Fix uninitialized local variable error which might have lead to
crash.

CRs-Fixed: 2030137
Change-Id: I3fd95cb343c3175e4190c8ebfe209399db0602a6
Signed-off-by: Abir Ghosh <abirg@codeaurora.org>
Signed-off-by: Kota Priyanka <kotap@codeaurora.org>
This commit is contained in:
Abir Ghosh 2017-04-11 10:10:23 +05:30 committed by Gerrit - the friendly Code Review server
parent 7b96bcfe6f
commit 3c75efaf9b

View File

@ -318,6 +318,12 @@ static long qbt1000_ioctl(
drvdata = file->private_data;
if (IS_ERR(priv_arg)) {
dev_err(drvdata->dev, "%s: invalid user space pointer %lu\n",
__func__, arg);
return -EINVAL;
}
mutex_lock(&drvdata->mutex);
pr_debug("%s %d\n", __func__, cmd);