tree: https://git.linuxtv.org/media_stage.git fixes head: ba9cf6b430433e57bfc8072364e944b7c0eca2a4 commit: 972e63e895abbe8aa1ccbdbb4e6362abda7cd457 [4/14] media: dvbdev: prevent the risk of out of memory access config: arm-randconfig-r073-20241020 (https://download.01.org/0day-ci/archive/20241020/202410201717.ULWWdJv8-lkp@xxxxxxxxx/config) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project bfe84f7085d82d06d61c632a7bad1e692fd159e4) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> | Closes: https://lore.kernel.org/r/202410201717.ULWWdJv8-lkp@xxxxxxxxx/ smatch warnings: drivers/media/dvb-core/dvbdev.c:554 dvb_register_device() error: uninitialized symbol 'ret'. vim +/ret +554 drivers/media/dvb-core/dvbdev.c 972e63e895abbe drivers/media/dvb-core/dvbdev.c Mauro Carvalho Chehab 2024-10-15 533 if (minor >= MAX_DVB_MINORS) { 627bb528b086b4 drivers/media/dvb-core/dvbdev.c Hyunwoo Kim 2022-11-17 534 if (new_node) { 627bb528b086b4 drivers/media/dvb-core/dvbdev.c Hyunwoo Kim 2022-11-17 535 list_del(&new_node->list_head); 5dd3f3071070f5 drivers/media/dvb/dvb-core/dvbdev.c Andreas Oberritter 2008-10-23 536 kfree(dvbdevfops); 627bb528b086b4 drivers/media/dvb-core/dvbdev.c Hyunwoo Kim 2022-11-17 537 kfree(new_node); 627bb528b086b4 drivers/media/dvb-core/dvbdev.c Hyunwoo Kim 2022-11-17 538 } 627bb528b086b4 drivers/media/dvb-core/dvbdev.c Hyunwoo Kim 2022-11-17 539 list_del(&dvbdev->list_head); 5dd3f3071070f5 drivers/media/dvb/dvb-core/dvbdev.c Andreas Oberritter 2008-10-23 540 kfree(dvbdev); 8c64f4cdf4e6cc drivers/media/dvb-core/dvbdev.c Zhipeng Lu 2024-02-03 541 *pdvbdev = NULL; 82163edcdfa4eb drivers/media/dvb/dvb-core/dvbdev.c Santosh Nayak 2012-06-23 542 up_write(&minor_rwsem); 5dd3f3071070f5 drivers/media/dvb/dvb-core/dvbdev.c Andreas Oberritter 2008-10-23 543 mutex_unlock(&dvbdev_register_lock); 5dd3f3071070f5 drivers/media/dvb/dvb-core/dvbdev.c Andreas Oberritter 2008-10-23 544 return -EINVAL; 5dd3f3071070f5 drivers/media/dvb/dvb-core/dvbdev.c Andreas Oberritter 2008-10-23 545 } 5dd3f3071070f5 drivers/media/dvb/dvb-core/dvbdev.c Andreas Oberritter 2008-10-23 546 #else 5dd3f3071070f5 drivers/media/dvb/dvb-core/dvbdev.c Andreas Oberritter 2008-10-23 547 minor = nums2minor(adap->num, type, id); 972e63e895abbe drivers/media/dvb-core/dvbdev.c Mauro Carvalho Chehab 2024-10-15 548 if (minor >= MAX_DVB_MINORS) { 972e63e895abbe drivers/media/dvb-core/dvbdev.c Mauro Carvalho Chehab 2024-10-15 549 dvb_media_device_free(dvbdev); 972e63e895abbe drivers/media/dvb-core/dvbdev.c Mauro Carvalho Chehab 2024-10-15 550 list_del(&dvbdev->list_head); 972e63e895abbe drivers/media/dvb-core/dvbdev.c Mauro Carvalho Chehab 2024-10-15 551 kfree(dvbdev); 972e63e895abbe drivers/media/dvb-core/dvbdev.c Mauro Carvalho Chehab 2024-10-15 552 *pdvbdev = NULL; 972e63e895abbe drivers/media/dvb-core/dvbdev.c Mauro Carvalho Chehab 2024-10-15 553 mutex_unlock(&dvbdev_register_lock); 972e63e895abbe drivers/media/dvb-core/dvbdev.c Mauro Carvalho Chehab 2024-10-15 @554 return ret; ^^^^^^^^^^^ This should be return -EINVAL; 972e63e895abbe drivers/media/dvb-core/dvbdev.c Mauro Carvalho Chehab 2024-10-15 555 } 5dd3f3071070f5 drivers/media/dvb/dvb-core/dvbdev.c Andreas Oberritter 2008-10-23 556 #endif 5dd3f3071070f5 drivers/media/dvb/dvb-core/dvbdev.c Andreas Oberritter 2008-10-23 557 dvbdev->minor = minor; -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki