Re: [PATCH v2 1/2] usb: serial: Add MaxLinear/Exar USB to Serial driver

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

 



On Thu, Apr 30, 2020 at 10:06:35AM +0530, mani@xxxxxxxxxx wrote:
> +	port_priv->idProduct = le16_to_cpu(serial->dev->descriptor.idProduct);
> +
> +	/* XR21V141X specific settings */
> +	if (port_priv->idProduct == XR21V141X_ID) {
> +		port_priv->regs = &xr21v141x_regs;
> +		port_priv->reg_width = 1;
> +	}

Shouldn't you abort here if idProduct does not have this value, as
that's all you test for everywhere else.  Do you even need to have this
test and save the value everywhere at all?

thanks,

greg k-h



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

  Powered by Linux