]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rt61pci: fix NULL pointer dereference in config_lna_gain
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 3 Aug 2012 10:49:14 +0000 (12:49 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 19 Aug 2012 17:15:30 +0000 (18:15 +0100)
commitb1769652fdd92c112ecbc9b6dc546f87517af46c
tree4390787b81d96675083f41b0c352953a3fb8a86c
parentc506474fed3246e4ea1dcf86809cbd802d57e541
rt61pci: fix NULL pointer dereference in config_lna_gain

commit deee0214def5d8a32b8112f11d9c2b1696e9c0cb upstream.

We can not pass NULL libconf->conf->channel to rt61pci_config() as it
is dereferenced unconditionally in rt61pci_config_lna_gain() subroutine.

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=44361

Reported-and-tested-by: <dolohow@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/rt2x00/rt61pci.c