Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf61393f authored by Pierre Morel's avatar Pierre Morel Committed by Martin Schwidefsky
Browse files

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: default avatarPierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent c967e1df
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);