]> git.baikalelectronics.ru Git - kernel.git/commit
ipack: ipoctal: fix missing allocation-failure check
authorJohan Hovold <johan@kernel.org>
Fri, 17 Sep 2021 11:46:20 +0000 (13:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Sep 2021 15:38:49 +0000 (17:38 +0200)
commit2dd97b88b06a0e8c107aa77fe9bdd7564c71e14c
treeb0f1cfb50ae42f2569fcce6097772d5a45d383eb
parent8df39b8d7c9659f4421eef686965b97adfe127c9
ipack: ipoctal: fix missing allocation-failure check

Add the missing error handling when allocating the transmit buffer to
avoid dereferencing a NULL pointer in write() should the allocation
ever fail.

Fixes: ad409ec391d7 ("Staging: ipack: add support for IP-OCTAL mezzanine board")
Cc: stable@vger.kernel.org # 3.5
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210917114622.5412-5-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ipack/devices/ipoctal.c