]> git.itanic.dy.fi Git - linux-stable/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:48:30 +0000 (06:48 -0700)
commitb1c2f7d1f8b314f031428b71b19ca304bec9b380
tree170a7715b8f78220a2f3825b4d6560b2549ca5ef
parent6673b01c7f498b2a0770f58b020968c98a3cb49e
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