[tty:tty-testing 2/3] drivers/tty/serial/8250/8250_of.c:142:3: error: label 'out' used but not defined

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
head:   70199fd386ba85f1e3d181692f57721d64b41ff3
commit: f312d9c315cce1a7cfb0fbc25b1fb7fbdf16f92f [2/3] serial: 8250: fix error handling in of_platform_serial_probe()
config: i386-randconfig-x017-201729 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout f312d9c315cce1a7cfb0fbc25b1fb7fbdf16f92f
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/tty/serial/8250/8250_of.c: In function 'of_platform_serial_setup':
>> drivers/tty/serial/8250/8250_of.c:142:3: error: label 'out' used but not defined
      goto out;
      ^~~~

vim +/out +142 drivers/tty/serial/8250/8250_of.c

bf03f65b79 drivers/tty/serial/of_serial.c    Dan Williams       2012-04-10   54  
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   55  /*
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   56   * Fill a struct uart_port for a given device node
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   57   */
9671f09921 drivers/tty/serial/of_serial.c    Bill Pemberton     2012-11-19   58  static int of_platform_serial_setup(struct platform_device *ofdev,
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22   59  			int type, struct uart_port *port,
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22   60  			struct of_serial_info *info)
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   61  {
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   62  	struct resource resource;
61c7a080a5 drivers/serial/of_serial.c        Grant Likely       2010-04-13   63  	struct device_node *np = ofdev->dev.of_node;
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30   64  	u32 clk, spd, prop;
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30   65  	int ret;
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   66  
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   67  	memset(port, 0, sizeof *port);
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30   68  	if (of_property_read_u32(np, "clock-frequency", &clk)) {
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22   69  
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22   70  		/* Get clk rate through clk driver if present */
3a63d22425 drivers/tty/serial/of_serial.c    Masahiro Yamada    2015-05-25   71  		info->clk = devm_clk_get(&ofdev->dev, NULL);
76cc43868c drivers/tty/serial/of_serial.c    Wei Yongjun        2012-11-01   72  		if (IS_ERR(info->clk)) {
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22   73  			dev_warn(&ofdev->dev,
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22   74  				"clk or clock-frequency not defined\n");
76cc43868c drivers/tty/serial/of_serial.c    Wei Yongjun        2012-11-01   75  			return PTR_ERR(info->clk);
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   76  		}
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22   77  
6f0c3091e7 drivers/tty/serial/of_serial.c    Masahiro Yamada    2015-05-25   78  		ret = clk_prepare_enable(info->clk);
6f0c3091e7 drivers/tty/serial/of_serial.c    Masahiro Yamada    2015-05-25   79  		if (ret < 0)
6f0c3091e7 drivers/tty/serial/of_serial.c    Masahiro Yamada    2015-05-25   80  			return ret;
6f0c3091e7 drivers/tty/serial/of_serial.c    Masahiro Yamada    2015-05-25   81  
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22   82  		clk = clk_get_rate(info->clk);
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22   83  	}
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30   84  	/* If current-speed was set, then try not to change it. */
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30   85  	if (of_property_read_u32(np, "current-speed", &spd) == 0)
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30   86  		port->custom_divisor = clk / (16 * spd);
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   87  
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   88  	ret = of_address_to_resource(np, 0, &resource);
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   89  	if (ret) {
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   90  		dev_warn(&ofdev->dev, "invalid address\n");
f312d9c315 drivers/tty/serial/8250/8250_of.c Alexey Khoroshilov 2017-07-01   91  		goto err_address;
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   92  	}
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   93  
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   94  	spin_lock_init(&port->lock);
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13   95  	port->mapbase = resource.start;
0787691230 drivers/tty/serial/of_serial.c    Mans Rullgard      2015-03-08   96  	port->mapsize = resource_size(&resource);
b912b5e2cf drivers/serial/of_serial.c        John Linn          2008-04-03   97  
b912b5e2cf drivers/serial/of_serial.c        John Linn          2008-04-03   98  	/* Check for shifted address mapping */
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30   99  	if (of_property_read_u32(np, "reg-offset", &prop) == 0)
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30  100  		port->mapbase += prop;
b912b5e2cf drivers/serial/of_serial.c        John Linn          2008-04-03  101  
b912b5e2cf drivers/serial/of_serial.c        John Linn          2008-04-03  102  	/* Check for registers offset within the devices address range */
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30  103  	if (of_property_read_u32(np, "reg-shift", &prop) == 0)
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30  104  		port->regshift = prop;
b912b5e2cf drivers/serial/of_serial.c        John Linn          2008-04-03  105  
9f1ca068ea drivers/tty/serial/of_serial.c    Heikki Krogerus    2013-03-25  106  	/* Check for fifo size */
9f1ca068ea drivers/tty/serial/of_serial.c    Heikki Krogerus    2013-03-25  107  	if (of_property_read_u32(np, "fifo-size", &prop) == 0)
9f1ca068ea drivers/tty/serial/of_serial.c    Heikki Krogerus    2013-03-25  108  		port->fifosize = prop;
9f1ca068ea drivers/tty/serial/of_serial.c    Heikki Krogerus    2013-03-25  109  
3239fd31d4 drivers/tty/serial/of_serial.c    Lucas Stach        2014-12-05  110  	/* Check for a fixed line number */
3239fd31d4 drivers/tty/serial/of_serial.c    Lucas Stach        2014-12-05  111  	ret = of_alias_get_id(np, "serial");
3239fd31d4 drivers/tty/serial/of_serial.c    Lucas Stach        2014-12-05  112  	if (ret >= 0)
3239fd31d4 drivers/tty/serial/of_serial.c    Lucas Stach        2014-12-05  113  		port->line = ret;
3239fd31d4 drivers/tty/serial/of_serial.c    Lucas Stach        2014-12-05  114  
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13  115  	port->irq = irq_of_parse_and_map(np, 0);
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13  116  	port->iotype = UPIO_MEM;
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30  117  	if (of_property_read_u32(np, "reg-io-width", &prop) == 0) {
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30  118  		switch (prop) {
7423734e19 drivers/tty/serial/of_serial.c    Jamie Iles         2011-06-27  119  		case 1:
7423734e19 drivers/tty/serial/of_serial.c    Jamie Iles         2011-06-27  120  			port->iotype = UPIO_MEM;
7423734e19 drivers/tty/serial/of_serial.c    Jamie Iles         2011-06-27  121  			break;
bd94c4077a drivers/tty/serial/of_serial.c    Masahiro Yamada    2015-10-28  122  		case 2:
bd94c4077a drivers/tty/serial/of_serial.c    Masahiro Yamada    2015-10-28  123  			port->iotype = UPIO_MEM16;
bd94c4077a drivers/tty/serial/of_serial.c    Masahiro Yamada    2015-10-28  124  			break;
7423734e19 drivers/tty/serial/of_serial.c    Jamie Iles         2011-06-27  125  		case 4:
ebc5e20082 drivers/tty/serial/of_serial.c    Kevin Cernekee     2015-04-09  126  			port->iotype = of_device_is_big_endian(np) ?
ebc5e20082 drivers/tty/serial/of_serial.c    Kevin Cernekee     2015-04-09  127  				       UPIO_MEM32BE : UPIO_MEM32;
7423734e19 drivers/tty/serial/of_serial.c    Jamie Iles         2011-06-27  128  			break;
7423734e19 drivers/tty/serial/of_serial.c    Jamie Iles         2011-06-27  129  		default:
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30  130  			dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n",
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30  131  				 prop);
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22  132  			ret = -EINVAL;
f312d9c315 drivers/tty/serial/8250/8250_of.c Alexey Khoroshilov 2017-07-01  133  			goto err_regio;
7423734e19 drivers/tty/serial/of_serial.c    Jamie Iles         2011-06-27  134  		}
7423734e19 drivers/tty/serial/of_serial.c    Jamie Iles         2011-06-27  135  	}
7423734e19 drivers/tty/serial/of_serial.c    Jamie Iles         2011-06-27  136  
e2860e1f62 drivers/tty/serial/8250/8250_of.c Joel Stanley       2017-05-29  137  	info->rst = devm_reset_control_get_optional_shared(&ofdev->dev, NULL);
e2860e1f62 drivers/tty/serial/8250/8250_of.c Joel Stanley       2017-05-29  138  	if (IS_ERR(info->rst))
e2860e1f62 drivers/tty/serial/8250/8250_of.c Joel Stanley       2017-05-29  139  		goto out;
e2860e1f62 drivers/tty/serial/8250/8250_of.c Joel Stanley       2017-05-29  140  	ret = reset_control_deassert(info->rst);
e2860e1f62 drivers/tty/serial/8250/8250_of.c Joel Stanley       2017-05-29  141  	if (ret)
e2860e1f62 drivers/tty/serial/8250/8250_of.c Joel Stanley       2017-05-29 @142  		goto out;
e2860e1f62 drivers/tty/serial/8250/8250_of.c Joel Stanley       2017-05-29  143  
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13  144  	port->type = type;
b84e773119 drivers/tty/serial/of_serial.c    Grant Likely       2011-06-30  145  	port->uartclk = clk;
abb4a23907 drivers/serial/of_serial.c        David Gibson       2007-05-06  146  	port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP
eedacbf02d drivers/serial/of_serial.c        Dave Mitchell      2009-06-09  147  		| UPF_FIXED_PORT | UPF_FIXED_TYPE;
fde8be2923 drivers/tty/serial/of_serial.c    Gabor Juhos        2012-07-17  148  
fde8be2923 drivers/tty/serial/of_serial.c    Gabor Juhos        2012-07-17  149  	if (of_find_property(np, "no-loopback-test", NULL))
fde8be2923 drivers/tty/serial/of_serial.c    Gabor Juhos        2012-07-17  150  		port->flags |= UPF_SKIP_TEST;
fde8be2923 drivers/tty/serial/of_serial.c    Gabor Juhos        2012-07-17  151  
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13  152  	port->dev = &ofdev->dev;
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13  153  
9b8777e347 drivers/tty/serial/of_serial.c    John Crispin       2014-10-16  154  	switch (type) {
9b8777e347 drivers/tty/serial/of_serial.c    John Crispin       2014-10-16  155  	case PORT_TEGRA:
bf03f65b79 drivers/tty/serial/of_serial.c    Dan Williams       2012-04-10  156  		port->handle_break = tegra_serial_handle_break;
9b8777e347 drivers/tty/serial/of_serial.c    John Crispin       2014-10-16  157  		break;
9b8777e347 drivers/tty/serial/of_serial.c    John Crispin       2014-10-16  158  
9b8777e347 drivers/tty/serial/of_serial.c    John Crispin       2014-10-16  159  	case PORT_RT2880:
9b8777e347 drivers/tty/serial/of_serial.c    John Crispin       2014-10-16  160  		port->iotype = UPIO_AU;
9b8777e347 drivers/tty/serial/of_serial.c    John Crispin       2014-10-16  161  		break;
9b8777e347 drivers/tty/serial/of_serial.c    John Crispin       2014-10-16  162  	}
bf03f65b79 drivers/tty/serial/of_serial.c    Dan Williams       2012-04-10  163  
d43b54d269 drivers/tty/serial/of_serial.c    Scott Wood         2015-10-07  164  	if (IS_ENABLED(CONFIG_SERIAL_8250_FSL) &&
d43b54d269 drivers/tty/serial/of_serial.c    Scott Wood         2015-10-07  165  	    (of_device_is_compatible(np, "fsl,ns16550") ||
d43b54d269 drivers/tty/serial/of_serial.c    Scott Wood         2015-10-07  166  	     of_device_is_compatible(np, "fsl,16550-FIFO64")))
d43b54d269 drivers/tty/serial/of_serial.c    Scott Wood         2015-10-07  167  		port->handle_irq = fsl8250_handle_irq;
d43b54d269 drivers/tty/serial/of_serial.c    Scott Wood         2015-10-07  168  
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13  169  	return 0;
f312d9c315 drivers/tty/serial/8250/8250_of.c Alexey Khoroshilov 2017-07-01  170  
f312d9c315 drivers/tty/serial/8250/8250_of.c Alexey Khoroshilov 2017-07-01  171  err_regio:
f312d9c315 drivers/tty/serial/8250/8250_of.c Alexey Khoroshilov 2017-07-01  172  	irq_dispose_mapping(port->irq);
f312d9c315 drivers/tty/serial/8250/8250_of.c Alexey Khoroshilov 2017-07-01  173  err_address:
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22  174  	if (info->clk)
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22  175  		clk_disable_unprepare(info->clk);
0bbeb3c3e8 drivers/tty/serial/of_serial.c    Murali Karicheri   2012-10-22  176  	return ret;
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13  177  }
8d38a5b2fa drivers/serial/of_serial.c        Arnd Bergmann      2007-02-13  178  

:::::: The code at line 142 was first introduced by commit
:::::: e2860e1f62f2e87d268403a749ba1f19663ef19f serial: 8250_of: Add reset support

:::::: TO: Joel Stanley <joel@xxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[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