]> git.baikalelectronics.ru Git - kernel.git/commit
b43: Fix possible NULL pointer dereference in DMA code
authorMichael Buesch <mb@bu3sch.de>
Thu, 12 Jun 2008 09:58:56 +0000 (11:58 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 13 Jun 2008 20:14:48 +0000 (16:14 -0400)
commitbdca7221ee13ffcdd474de53f71ce86eb752c43a
tree10ae9463691e3decc9bd4773682a35418cdf2b10
parent8994a8de1b6e3d1a9644e7a57760562cf81dc9dc
b43: Fix possible NULL pointer dereference in DMA code

This fixes a possible NULL pointer dereference in an error path of the
DMA allocation error checking code. This is also necessary for a future
DMA API change that is on its way into the mainline kernel that adds
an additional dev parameter to dma_mapping_error().

This patch moves the whole struct b43_dmaring struct initialization
right before any DMA allocation operation.

Reported-by: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/dma.c