mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
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>
This commit is contained in:
parent
c967e1df16
commit
cf61393f4a
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue