Hello Marvin Lin, The patch 70721089985c: "media: nuvoton: Add driver for NPCM video capture and encoding engine" from Sep 22, 2023 (linux-next), leads to the following Smatch static checker warning: drivers/media/platform/nuvoton/npcm-video.c:493 npcm_video_find_rect() warn: sleeping in atomic context drivers/media/platform/nuvoton/npcm-video.c 488 static int npcm_video_find_rect(struct npcm_video *video, 489 struct rect_list_info *info, 490 unsigned int offset) 491 { 492 if (offset < info->tile_perline) { --> 493 info->list = npcm_video_new_rect(video, offset, info->index); Does a sleeping allocation. 494 if (!info->list) { 495 dev_err(video->dev, "Failed to allocate rect_list\n"); 496 return -ENOMEM; 497 } 498 499 npcm_video_merge_rect(video, info); 500 } 501 return 0; 502 } The problematic call tree is: npcm_video_irq() <- disables preempt -> npcm_video_hextile() -> npcm_video_get_diff_rect() -> npcm_video_get_rect_list() -> npcm_video_build_table() -> npcm_video_find_rect() The npcm_video_irq() function holds spin_lock(&video->lock) and we can't sleep while holding a spinlock. regards, dan carpenter