diff options
author | Pierre Morel <pmorel@linux.vnet.ibm.com> | 2015-12-21 14:31:06 (GMT) |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-12-30 09:34:33 (GMT) |
commit | cf61393f4aa30f4c2a11cf2437d49ff4de6eb4fb (patch) | |
tree | bbb6f174bb1c5db77d8b79cf56eab037851019fa /drivers/s390/char/con3270.c | |
parent | c967e1df169d033b2da74e979e91b6e297e194fa (diff) | |
download | linux-cf61393f4aa30f4c2a11cf2437d49ff4de6eb4fb.tar.xz |
s390/con3270: testing return kzalloc retval
Return value from kzalloc is not tested and
using a null pointer would lead to crash.
Even if this should not happen at this moment, we
may let the system decide if there is a better choice.
Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/con3270.c')
-rw-r--r-- | drivers/s390/char/con3270.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c index 7c511ad..4d7a9bad 100644 --- a/drivers/s390/char/con3270.c +++ b/drivers/s390/char/con3270.c @@ -606,6 +606,8 @@ con3270_init(void) return PTR_ERR(rp); condev = kzalloc(sizeof(struct con3270), GFP_KERNEL | GFP_DMA); + if (!condev) + return -ENOMEM; condev->view.dev = rp; condev->read = raw3270_request_alloc(0); |