summaryrefslogtreecommitdiff
path: root/drivers/nfc/trf7970a.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2017-02-19 12:58:47 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2017-04-02 01:18:35 +0300
commit8f79ded95934154d4454b6e422a18a3fbcd7a268 (patch)
tree3fd1d1aaf10da2b3301deca7f117a2f0426deb42 /drivers/nfc/trf7970a.c
parentca42fb9e52d155547e6cf18cf26bce3e1a6af4ea (diff)
downloadlinux-8f79ded95934154d4454b6e422a18a3fbcd7a268.tar.xz
NFC: st21nfca: Fix potential memory leak
If all bits of 'dev_mask' are already set, there is a memory leak because 'info' should be freed before returning. While fixing it, 'return -ENOMEM' directly if the first kzalloc fails. This makes the code more readable. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/trf7970a.c')
0 files changed, 0 insertions, 0 deletions