On 15/10/13 01:54, Mark Rutland wrote:
[Adding Tony Prisk and linux-serial]
Hi Roel,
While this looks like a good fix, the commit message is a bit confusing.
How about something like the message between the scissor lines below:
---->8----
[PATCH] serial: vt8500: add missing braces
Due to missing braces on an if statement, port will always be assigned
-1 regardless of any alias entries in the dt, which was clearly not the
intended behaviour.
This patch adds the missing braces, fixing the issue.
---->8----
Also, while this is device tree related, you should Cc the driver
maintainer when submitting driver changes.
Cheers,
Mark.
On Sun, Oct 13, 2013 at 11:29:36PM +0100, Roel Kluin wrote:
Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
drivers/tty/serial/vt8500_serial.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c
index 93b697a..4cf71c0 100644
--- a/drivers/tty/serial/vt8500_serial.c
+++ b/drivers/tty/serial/vt8500_serial.c
@@ -561,12 +561,13 @@ static int vt8500_serial_probe(struct platform_device *pdev)
if (!mmres || !irqres)
return -ENODEV;
- if (np)
+ if (np) {
port = of_alias_get_id(np, "serial");
if (port >= VT8500_MAX_PORTS)
port = -1;
- else
+ } else {
port = -1;
+ }
if (port < 0) {
/* calculate the port id */
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Nice find and thanks for the fix.
Acked-by: Tony Prisk <linux@xxxxxxxxxxxxxxx>
Regards
Tony P
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html