Re: [PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit register access functions.

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

 





On 14/01/16 18:22, Konstantin Shkolnyy wrote:
-----Original Message-----
From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-
owner@xxxxxxxxxxxxxxx] On Behalf Of Martyn Welch
Sent: Thursday, January 14, 2016 11:44
To: Konstantin Shkolnyy; johan@xxxxxxxxxx
Cc: linux-usb@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit register
access functions.
...

@@ -697,14 +685,11 @@ static unsigned int
cp210x_quantise_baudrate(unsigned int baud)

   static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
   {
-	int result;
+	int err;

-	result = cp210x_set_config_single(port, CP210X_IFC_ENABLE,
-
	UART_ENABLE);
-	if (result) {
-		dev_err(&port->dev, "%s - Unable to enable UART\n",
__func__);
-		return result;
-	}
+	err = cp210x_write_u16_reg(port, CP210X_IFC_ENABLE,
UART_ENABLE);
+	if (err)
+		return err;

Any reason for dropping the error message?

I already print a message if the underlying usb_control_msg fails, so it should be covered there.


Sounds like a very valid reason :-)

Martyn
--
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