]> www.infradead.org Git - users/dwmw2/linux.git/commit
tty: ipwireless: fix missing checks for ioremap
authorKangjie Lu <kjlu@umn.edu>
Fri, 15 Mar 2019 07:07:12 +0000 (02:07 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:47:32 +0000 (06:47 -0700)
commitb6941f2f356b9c46f95b135554c69d8d6b825885
tree4497614b3a05c45e9e00c447667912da6c52dd62
parent5db7c0295dec2255ae612877bd33674d6de215fa
tty: ipwireless: fix missing checks for ioremap

[ Upstream commit 1bbb1c318cd8a3a39e8c3e2e83d5e90542d6c3e3 ]

ipw->attr_memory and ipw->common_memory are assigned with the
return value of ioremap. ioremap may fail, but no checks
are enforced. The fix inserts the checks to avoid potential
NULL pointer dereferences.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/ipwireless/main.c