Hello Alex Dewar, The patch fbcfdfab4a2c: "staging: emxx_udc: Allow for building on !ARM" from Aug 18, 2020, leads to the following static checker warning: drivers/staging/emxx_udc/emxx_udc.c:2167 _nbu2ss_enable_controller() warn: inconsistent indenting drivers/staging/emxx_udc/emxx_udc.c:2179 _nbu2ss_enable_controller() warn: inconsistent indenting drivers/staging/emxx_udc/emxx_udc.c:2277 _nbu2ss_check_vbus() warn: 'reg_dt' can be either negative or positive drivers/staging/emxx_udc/emxx_udc.c:2352 _nbu2ss_udc_irq() warn: 'gpiod_get_value(vbus_gpio)' returns positive and negative drivers/staging/emxx_udc/emxx_udc.c:2361 _nbu2ss_udc_irq() warn: 'gpiod_get_value(vbus_gpio)' returns positive and negative drivers/staging/emxx_udc/emxx_udc.c:2324 _nbu2ss_int_usb_suspend() warn: 'reg_dt' can be either negative or positive drivers/staging/emxx_udc/emxx_udc.c:2596 nbu2ss_ep_queue() error: NULL dereference inside function drivers/staging/emxx_udc/emxx_udc.c:2795 nbu2ss_ep_fifo_flush() warn: 'data' can be either negative or positive drivers/staging/emxx_udc/emxx_udc.c:3151 nbu2ss_drv_remove() error: NULL dereference inside function drivers/staging/emxx_udc/emxx_udc.c 2580 if (unlikely(!udc->driver)) { 2581 dev_err(udc->dev, "%s, bogus device state %p\n", __func__, 2582 udc->driver); 2583 return -ESHUTDOWN; 2584 } 2585 2586 spin_lock_irqsave(&udc->lock, flags); 2587 2588 #ifdef USE_DMA 2589 if ((uintptr_t)req->req.buf & 0x3) 2590 req->unaligned = true; 2591 else 2592 req->unaligned = false; 2593 2594 if (req->unaligned) { 2595 if (!ep->virt_buf) 2596 ep->virt_buf = dma_alloc_coherent(NULL, PAGE_SIZE, ^^^^ This will oops. 2597 &ep->phys_buf, 2598 GFP_ATOMIC | GFP_DMA); 2599 if (ep->epnum > 0) { 2600 if (ep->direct == USB_DIR_IN) 2601 memcpy(ep->virt_buf, req->req.buf, 2602 req->req.length); 2603 } 2604 } 2605 2606 if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT) && 2607 (req->req.dma != 0)) 2608 _nbu2ss_dma_map_single(udc, ep, req, USB_DIR_OUT); 2609 #endif 2610 regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel