diff options
| author | Tharun Kumar Merugu <mtharu@codeaurora.org> | 2017-05-16 23:40:05 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-05-18 04:33:32 -0700 |
| commit | 6e853a66c3493a865641d903f76cdddaace2ab1f (patch) | |
| tree | fc7692da7d3a01287278dad46ed87f3923072c63 | |
| parent | 5404e35069576a8cd8203065f60975e34a5f727b (diff) | |
SDM660: ADSPRPC: Fix for NULL pointer dereference
Fixing NULL pointer dereference in fastrpc_device_ioctl
Change-Id: I240e6eae69f9ab4831352a8bf160d5f0e8a98b1b
Acked-by: Chenna Kesava Raju <chennak@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
| -rw-r--r-- | drivers/char/adsprpc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 1b76f58809b3..14c833691194 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -2552,7 +2552,8 @@ static int fastrpc_get_info(struct fastrpc_file *fl, uint32_t *info) if (err) goto bail; } - *info = (fl->sctx->smmu.enabled ? 1 : 0); + if (fl->sctx) + *info = (fl->sctx->smmu.enabled ? 1 : 0); bail: return err; } |
