Re: [PATCH V2 1/3] serial: rp2: New driver for Comtrol RocketPort 2 cards

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

 



On Sat, 2012-12-29 at 23:23 -0800, Kevin Cernekee wrote:
[...]
> --- /dev/null
> +++ b/drivers/tty/serial/rp2.c
[...]
> +static struct uart_ops rp2_uart_ops = {

const?

[...]
> +static void rp2_fw_cb(const struct firmware *fw, void *context)
> +{
> +	struct rp2_card *card = context;
> +	resource_size_t phys_base;
> +	int i, rc = -ENOENT;
> +
> +	if (!fw) {
> +		dev_err(&card->pdev->dev, "cannot find '%s' firmware image\n",
> +			RP2_FW_NAME);
> +		goto no_fw;
> +	}
[...]
> +no_fw:
> +	complete(&card->fw_loaded);
> +
> +	/*
> +	 * rp2_fw_cb() is called from a workqueue long after rp2_probe()
> +	 * has already returned success.  So if something failed here, we
> +	 * need to manually yank the device.  This calls rp2_remove().
> +	 */
> +	if (rc)
> +		device_release_driver(&card->pdev->dev);
[...]

The driver can be unbound and then re-bound immediately after this
function calls complete().  This will then unbind it a second time!

Is it really necessary to unbind here?

Ben.

-- 
Ben Hutchings
It is easier to change the specification to fit the program than vice versa.

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux