Re: [driver-core:const_driver 12/12] drivers/usb/core/driver.c:80 store_id() error: uninitialized symbol 'usb_dynid'.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 13, 2024 at 08:18:04AM +0200, Greg Kroah-Hartman wrote:
> On Thu, Jun 13, 2024 at 08:57:13AM +0300, Dan Carpenter wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git const_driver
> > head:   be520b87ec28aa3b5c908a859501fb601bd8b322
> > commit: be520b87ec28aa3b5c908a859501fb601bd8b322 [12/12] USB: move dynamic ids out of usb driver structures
> > config: i386-randconfig-141-20240613 (https://download.01.org/0day-ci/archive/20240613/202406130740.HIr25kIC-lkp@xxxxxxxxx/config)
> > compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
> > 
> > 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/202406130740.HIr25kIC-lkp@xxxxxxxxx/
> > 
> > smatch warnings:
> > drivers/usb/core/driver.c:80 store_id() error: uninitialized symbol 'usb_dynid'.
> > 
> > vim +/usb_dynid +80 drivers/usb/core/driver.c
> > 
> > be520b87ec28aa Greg Kroah-Hartman 2024-06-11  70  static int store_id(const struct device_driver *driver, const struct usb_device_id *id)
> > be520b87ec28aa Greg Kroah-Hartman 2024-06-11  71  {
> > be520b87ec28aa Greg Kroah-Hartman 2024-06-11  72  	struct usb_dynids *u;
> > be520b87ec28aa Greg Kroah-Hartman 2024-06-11  73  	struct usb_dynid *usb_dynid;
> > be520b87ec28aa Greg Kroah-Hartman 2024-06-11  74  
> > be520b87ec28aa Greg Kroah-Hartman 2024-06-11  75  	u = usb_find_dynids(driver);
> > be520b87ec28aa Greg Kroah-Hartman 2024-06-11  76  	if (!u) {
> > be520b87ec28aa Greg Kroah-Hartman 2024-06-11  77  		/* This driver has not stored any ids yet, so make a new entry for it */
> > be520b87ec28aa Greg Kroah-Hartman 2024-06-11  78  		u = kmalloc(sizeof(*u), GFP_KERNEL);
> > be520b87ec28aa Greg Kroah-Hartman 2024-06-11  79  		if (!u) {
> > be520b87ec28aa Greg Kroah-Hartman 2024-06-11 @80  			kfree(usb_dynid);
> > 
> > Delete the kfree()
> 
> Ugh, thanks, missed that.
> 
> And you are now testing random branches in my tree, nice!  Note, I
> haven't even booted this one yet, it barely builds :)

These are zero day bot stuff.  The zero day bot is always out there
automatically slurping up any git repository it can find.  There is a
way to opt-out but I can't remember what it is...

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux