mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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:
parent
7b96bcfe6f
commit
3c75efaf9b
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user