From: David S. Miller Date: Mon, 26 Jun 2006 07:10:46 +0000 (-0700) Subject: [IOAT]: Do not dereference THIS_MODULE directly to set unsafe. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8070b2b1ecbeb5437c92c33b4dcea1d8d80399ee;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [IOAT]: Do not dereference THIS_MODULE directly to set unsafe. Use the __unsafe() macro instead. Noticed by Miles Lane. Signed-off-by: David S. Miller --- diff --git a/drivers/dma/ioatdma.c b/drivers/dma/ioatdma.c index 0fdf7fbd6495..2801d14a5e42 100644 --- a/drivers/dma/ioatdma.c +++ b/drivers/dma/ioatdma.c @@ -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);