s390/3270: Fix buffer assignment
authorSven Schnelle <svens@linux.ibm.com>
Tue, 23 Apr 2024 05:57:49 +0000 (07:57 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Fri, 26 Apr 2024 14:22:38 +0000 (16:22 +0200)
commit5e1a99cf22a65bd91cb43c5380cc14a44b85ad2a
treebabab91801c4f04c7e5d124128cf42d773a6ee56
parent412050af2ea39407fe43324b0be4ab641530ce88
s390/3270: Fix buffer assignment

Since commit 1b2ac5a6d61f ("s390/3270: use new address translation
helpers") rq->buffer is passed unconditionally to virt_to_dma32().
The 3270 driver allocates requests without buffer, so the value passed
to virt_to_dma32 might be NULL. Check for NULL before assigning.

Fixes: 1b2ac5a6d61f ("s390/3270: use new address translation helpers")
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
drivers/s390/char/raw3270.c