All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [tty:tty-next 17/90] drivers/tty/serial/liteuart.c:328 liteuart_probe() warn: missing unwind goto?
Date: Sat, 21 Jan 2023 07:13:08 +0800	[thread overview]
Message-ID: <202301210724.SCRcRjOR-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-serial@vger.kernel.org
TO: Gabriel Somlo <gsomlo@gmail.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
CC: Jiri Slaby <jirislaby@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
head:   05e2600cb0a4d73b0779cf29512819616252aeeb
commit: 5602cf99dcdcc0bf8f9a5979b7443fbe46686995 [17/90] serial: liteuart: add IRQ support for the RX path
:::::: branch date: 32 hours ago
:::::: commit date: 33 hours ago
config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20230121/202301210724.SCRcRjOR-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>

smatch warnings:
drivers/tty/serial/liteuart.c:328 liteuart_probe() warn: missing unwind goto?

vim +328 drivers/tty/serial/liteuart.c

1da81e5562fac8 Filip Kokosinski 2020-10-13  293  
1da81e5562fac8 Filip Kokosinski 2020-10-13  294  static int liteuart_probe(struct platform_device *pdev)
1da81e5562fac8 Filip Kokosinski 2020-10-13  295  {
1da81e5562fac8 Filip Kokosinski 2020-10-13  296  	struct liteuart_port *uart;
1da81e5562fac8 Filip Kokosinski 2020-10-13  297  	struct uart_port *port;
1da81e5562fac8 Filip Kokosinski 2020-10-13  298  	struct xa_limit limit;
1da81e5562fac8 Filip Kokosinski 2020-10-13  299  	int dev_id, ret;
1da81e5562fac8 Filip Kokosinski 2020-10-13  300  
1da81e5562fac8 Filip Kokosinski 2020-10-13  301  	/* look for aliases; auto-enumerate for free index if not found */
1da81e5562fac8 Filip Kokosinski 2020-10-13  302  	dev_id = of_alias_get_id(pdev->dev.of_node, "serial");
1da81e5562fac8 Filip Kokosinski 2020-10-13  303  	if (dev_id < 0)
1da81e5562fac8 Filip Kokosinski 2020-10-13  304  		limit = XA_LIMIT(0, CONFIG_SERIAL_LITEUART_MAX_PORTS);
1da81e5562fac8 Filip Kokosinski 2020-10-13  305  	else
1da81e5562fac8 Filip Kokosinski 2020-10-13  306  		limit = XA_LIMIT(dev_id, dev_id);
1da81e5562fac8 Filip Kokosinski 2020-10-13  307  
1da81e5562fac8 Filip Kokosinski 2020-10-13  308  	uart = devm_kzalloc(&pdev->dev, sizeof(struct liteuart_port), GFP_KERNEL);
1da81e5562fac8 Filip Kokosinski 2020-10-13  309  	if (!uart)
1da81e5562fac8 Filip Kokosinski 2020-10-13  310  		return -ENOMEM;
1da81e5562fac8 Filip Kokosinski 2020-10-13  311  
1da81e5562fac8 Filip Kokosinski 2020-10-13  312  	ret = xa_alloc(&liteuart_array, &dev_id, uart, limit, GFP_KERNEL);
1da81e5562fac8 Filip Kokosinski 2020-10-13  313  	if (ret)
1da81e5562fac8 Filip Kokosinski 2020-10-13  314  		return ret;
1da81e5562fac8 Filip Kokosinski 2020-10-13  315  
1da81e5562fac8 Filip Kokosinski 2020-10-13  316  	uart->id = dev_id;
1da81e5562fac8 Filip Kokosinski 2020-10-13  317  	port = &uart->port;
1da81e5562fac8 Filip Kokosinski 2020-10-13  318  
1da81e5562fac8 Filip Kokosinski 2020-10-13  319  	/* get membase */
1da81e5562fac8 Filip Kokosinski 2020-10-13  320  	port->membase = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
dd5e90b16cca8a Johan Hovold     2021-11-17  321  	if (IS_ERR(port->membase)) {
dd5e90b16cca8a Johan Hovold     2021-11-17  322  		ret = PTR_ERR(port->membase);
dd5e90b16cca8a Johan Hovold     2021-11-17  323  		goto err_erase_id;
dd5e90b16cca8a Johan Hovold     2021-11-17  324  	}
1da81e5562fac8 Filip Kokosinski 2020-10-13  325  
5602cf99dcdcc0 Gabriel Somlo    2022-11-23  326  	ret = platform_get_irq_optional(pdev, 0);
5602cf99dcdcc0 Gabriel Somlo    2022-11-23  327  	if (ret < 0 && ret != -ENXIO)
5602cf99dcdcc0 Gabriel Somlo    2022-11-23 @328  		return ret;
5602cf99dcdcc0 Gabriel Somlo    2022-11-23  329  	if (ret > 0)
5602cf99dcdcc0 Gabriel Somlo    2022-11-23  330  		port->irq = ret;
5602cf99dcdcc0 Gabriel Somlo    2022-11-23  331  
1da81e5562fac8 Filip Kokosinski 2020-10-13  332  	/* values not from device tree */
1da81e5562fac8 Filip Kokosinski 2020-10-13  333  	port->dev = &pdev->dev;
1da81e5562fac8 Filip Kokosinski 2020-10-13  334  	port->iotype = UPIO_MEM;
1da81e5562fac8 Filip Kokosinski 2020-10-13  335  	port->flags = UPF_BOOT_AUTOCONF;
1da81e5562fac8 Filip Kokosinski 2020-10-13  336  	port->ops = &liteuart_ops;
1da81e5562fac8 Filip Kokosinski 2020-10-13  337  	port->fifosize = 16;
1da81e5562fac8 Filip Kokosinski 2020-10-13  338  	port->type = PORT_UNKNOWN;
1da81e5562fac8 Filip Kokosinski 2020-10-13  339  	port->line = dev_id;
1da81e5562fac8 Filip Kokosinski 2020-10-13  340  	spin_lock_init(&port->lock);
1da81e5562fac8 Filip Kokosinski 2020-10-13  341  
0f55f89d98c8b3 Ilia Sergachev   2021-11-15  342  	platform_set_drvdata(pdev, port);
0f55f89d98c8b3 Ilia Sergachev   2021-11-15  343  
dd5e90b16cca8a Johan Hovold     2021-11-17  344  	ret = uart_add_one_port(&liteuart_driver, &uart->port);
dd5e90b16cca8a Johan Hovold     2021-11-17  345  	if (ret)
dd5e90b16cca8a Johan Hovold     2021-11-17  346  		goto err_erase_id;
dd5e90b16cca8a Johan Hovold     2021-11-17  347  
dd5e90b16cca8a Johan Hovold     2021-11-17  348  	return 0;
dd5e90b16cca8a Johan Hovold     2021-11-17  349  
dd5e90b16cca8a Johan Hovold     2021-11-17  350  err_erase_id:
dd5e90b16cca8a Johan Hovold     2021-11-17  351  	xa_erase(&liteuart_array, uart->id);
dd5e90b16cca8a Johan Hovold     2021-11-17  352  
dd5e90b16cca8a Johan Hovold     2021-11-17  353  	return ret;
1da81e5562fac8 Filip Kokosinski 2020-10-13  354  }
1da81e5562fac8 Filip Kokosinski 2020-10-13  355  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

             reply	other threads:[~2023-01-20 23:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 23:13 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-01-23 12:04 [tty:tty-next 17/90] drivers/tty/serial/liteuart.c:328 liteuart_probe() warn: missing unwind goto? Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202301210724.SCRcRjOR-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.