From: Vineet Gupta Date: Fri, 11 Jan 2013 06:20:20 +0000 (+0530) Subject: serial/arc-uart: Don't index with -ve platform_device->id X-Git-Tag: v3.9-rc1~125^2~120 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=026bb292c4018dd77186dee1fcb73c9067e69b89;p=pandora-kernel.git serial/arc-uart: Don't index with -ve platform_device->id probe routine could index into port[] with -ve index. The check in arc_uart_init_one() was too late. This came to light when trying to port driver to CONFIG_OF, where bydefault of-core code sets -ve platform dev id and in absence of DT serial aliases, driver would use the -ve index. Signed-off-by: Vineet Gupta Cc: Alan Cox Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed