Re: [PATCH 3/5] USB: bcma: use devm_kzalloc

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

 



On 2 June 2015 at 00:13, Hauke Mehrtens <hauke@xxxxxxxxxx> wrote:
> @@ -239,10 +240,8 @@ static int bcma_hcd_probe(struct bcma_device *dev)
>                 ohci_addr = 0x18009000;
>
>         usb_dev->ohci_dev = bcma_hcd_create_pdev(dev, true, ohci_addr);
> -       if (IS_ERR(usb_dev->ohci_dev)) {
> -               err = PTR_ERR(usb_dev->ohci_dev);
> -               goto err_free_usb_dev;
> -       }
> +       if (IS_ERR(usb_dev->ohci_dev))
> +               return PTR_ERR(usb_dev->ohci_dev);
>
>         usb_dev->ehci_dev = bcma_hcd_create_pdev(dev, false, dev->addr);
>         if (IS_ERR(usb_dev->ehci_dev)) {

Just noticed something: bcma_hcd_create_pdev can return NULL.
Can you handle this, please? No need to modify this patch probably
(you don't make anything worse with it), maybe just do it in separated
one?

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux