[bug report] usb: host: fotg2: add silicon clock handling

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

 



Hello Linus Walleij,

This is a semi-automatic email about new static checker warnings.

The patch ffa8a31b5b3b: "usb: host: fotg2: add silicon clock 
handling" from Sep 1, 2018, leads to the following Smatch complaint:

    drivers/usb/host/fotg210-hcd.c:5666 fotg210_hcd_remove()
     warn: variable dereferenced before check 'hcd' (see line 5661)

drivers/usb/host/fotg210-hcd.c
  5660		struct usb_hcd *hcd = dev_get_drvdata(dev);
  5661		struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd);
                                                             ^^^
Patch adds a dereference

  5662	
  5663		if (!IS_ERR(fotg210->pclk))
  5664			clk_disable_unprepare(fotg210->pclk);
  5665	
  5666		if (!hcd)
                     ^^^
The old code assumes "hcd" can be NULL.

  5667			return 0;
  5668	

regards,
dan carpenter



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux