NFC: Fix possible NULL dereference
NULL pointer dereference can cause runtime issue due to improper check. Modify code to add proper check to avoid NULL pointer dereference. Change-Id: I51e846a6e5fd186e0aaae3e05326222a7f40ec06 Signed-off-by: Tapas Dey <tdey@codeaurora.org>
This commit is contained in:
parent
2031377a22
commit
5a881e2a17
1 changed files with 1 additions and 1 deletions
|
@ -808,7 +808,7 @@ static int nfcc_hw_check(struct i2c_client *client, struct nqx_dev *nqx_dev)
|
|||
}
|
||||
|
||||
nci_reset_ntf = kzalloc(NCI_RESET_NTF_LEN + 1, GFP_DMA | GFP_KERNEL);
|
||||
if (!nci_reset_rsp) {
|
||||
if (!nci_reset_ntf) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue