Skip to content

Commit

Permalink
[IOAT]: Do not dereference THIS_MODULE directly to set unsafe.
Browse files Browse the repository at this point in the history
Use the __unsafe() macro instead.

Noticed by Miles Lane.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jun 26, 2006
1 parent 5238367 commit 8070b2b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/dma/ioatdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,10 +824,9 @@ static int __init ioat_init_module(void)
{
/* it's currently unsafe to unload this module */
/* if forced, worst case is that rmmod hangs */
if (THIS_MODULE != NULL)
THIS_MODULE->unsafe = 1;
__unsafe(THIS_MODULE);

return pci_module_init(&ioat_pci_drv);
pci_module_init(&ioat_pci_drv);
}

module_init(ioat_init_module);
Expand Down

0 comments on commit 8070b2b

Please sign in to comment.