From: Fabio Estevam <redacted>
devm_kzalloc() may fail, so we should better check for error and
propagate the error in the case of allocation failure.
This avoids a potential NULL pointer dereference later on.
Signed-off-by: Fabio Estevam <redacted>
---
drivers/nfc/st21nfca/se.c | 2 ++
1 file changed, 2 insertions(+)
From: Fabio Estevam <redacted>
There is no need to use cast for the returned value
from memory allocation functions, so remove the unnecessary cast.
Detected via Coccinelle script:
scripts/coccinelle/api/alloc/alloc_cast.cocci.
Signed-off-by: Fabio Estevam <redacted>
---
drivers/nfc/st21nfca/se.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Hi Samuel,
Maybe this patch series got forgotten?
On Sat, Mar 24, 2018 at 10:44 AM, Fabio Estevam [off-list ref] wrote:
quoted hunk
From: Fabio Estevam <redacted>
devm_kzalloc() may fail, so we should better check for error and
propagate the error in the case of allocation failure.
This avoids a potential NULL pointer dereference later on.
Signed-off-by: Fabio Estevam <redacted>
---
drivers/nfc/st21nfca/se.c | 2 ++
1 file changed, 2 insertions(+)