drivers/tty/serial/sh-sci.c:2850 sci_request_port() warn: 'port->mapbase' from __request_region() not released on lines: 2847.
kernel test robot
build botBCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: "Jiri Slaby (SUSE)" <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: d8a9a4b11a137909e306e50346148fc5c3b63f9d commit: 2667bd6673eb49c9c299c1202bab5a3fc04586de serial: 8250_port: simplify serial8250_request_std_resource() date: 1 year ago
:::::: branch date: 11 hours ago
:::::: commit date: 1 year ago
config: alpha-randconfig-r071-20260403 (https://download.01.org/0day-ci/archive/20260403/[email protected]/config)
compiler: alpha-linux-gcc (GCC) 8.5.0
smatch: v0.5.0-9004-gb810ac53
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Fixes: 2667bd6673eb ("serial: 8250_port: simplify serial8250_request_std_resource()")
| Reported-by: kernel test robot <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/New smatch warnings:drivers/tty/serial/sh-sci.c:2850 sci_request_port() warn: 'port->mapbase' from __request_region() not released on lines: 2847.
Old smatch warnings:
internal error: arch/alpha/include/asm/io_trivial.h:12 SQL error #2: near "and": syntax error
internal error: arch/alpha/include/asm/io_trivial.h:12 SQL: 'select * from return_states where and type = 1044 and parameter = -1 and key = '$' limit 1;'
vim +2850 drivers/tty/serial/sh-sci.c
e2651647080930 drivers/serial/sh-sci.c Paul Mundt 2011-01-20 2830
e2651647080930 drivers/serial/sh-sci.c Paul Mundt 2011-01-20 2831 static int sci_request_port(struct uart_port *port)
^1da177e4c3f41 drivers/serial/sh-sci.c Linus Torvalds 2005-04-16 2832 {
e2651647080930 drivers/serial/sh-sci.c Paul Mundt 2011-01-20 2833 struct resource *res;
e4d6f911a7cea1 drivers/tty/serial/sh-sci.c Yoshinori Sato 2015-05-16 2834 struct sci_port *sport = to_sci_port(port);
f6e9495d68b911 drivers/serial/sh-sci.c Paul Mundt 2011-01-21 2835 int ret;
^1da177e4c3f41 drivers/serial/sh-sci.c Linus Torvalds 2005-04-16 2836
e4d6f911a7cea1 drivers/tty/serial/sh-sci.c Yoshinori Sato 2015-05-16 2837 res = request_mem_region(port->mapbase, sport->reg_size,
e4d6f911a7cea1 drivers/tty/serial/sh-sci.c Yoshinori Sato 2015-05-16 2838 dev_name(port->dev));
e4d6f911a7cea1 drivers/tty/serial/sh-sci.c Yoshinori Sato 2015-05-16 2839 if (unlikely(res == NULL)) {
e4d6f911a7cea1 drivers/tty/serial/sh-sci.c Yoshinori Sato 2015-05-16 2840 dev_err(port->dev, "request_mem_region failed.");
e2651647080930 drivers/serial/sh-sci.c Paul Mundt 2011-01-20 2841 return -EBUSY;
e4d6f911a7cea1 drivers/tty/serial/sh-sci.c Yoshinori Sato 2015-05-16 2842 }
^1da177e4c3f41 drivers/serial/sh-sci.c Linus Torvalds 2005-04-16 2843
f6e9495d68b911 drivers/serial/sh-sci.c Paul Mundt 2011-01-21 2844 ret = sci_remap_port(port);
f6e9495d68b911 drivers/serial/sh-sci.c Paul Mundt 2011-01-21 2845 if (unlikely(ret != 0)) {
e2651647080930 drivers/serial/sh-sci.c Paul Mundt 2011-01-20 2846 release_resource(res);
f6e9495d68b911 drivers/serial/sh-sci.c Paul Mundt 2011-01-21 2847 return ret;
7ff731aeba1cda drivers/serial/sh-sci.c Paul Mundt 2008-10-01 2848 }
e2651647080930 drivers/serial/sh-sci.c Paul Mundt 2011-01-20 2849
e2651647080930 drivers/serial/sh-sci.c Paul Mundt 2011-01-20 @2850 return 0;
e2651647080930 drivers/serial/sh-sci.c Paul Mundt 2011-01-20 2851 }
e2651647080930 drivers/serial/sh-sci.c Paul Mundt 2011-01-20 2852 :::::: The code at line 2850 was first introduced by commit
:::::: e2651647080930a1846196c3b79f4de662100388 serial: sh-sci: Handle port memory region reservations.
:::::: TO: Paul Mundt <[email protected]>
:::::: CC: Paul Mundt <[email protected]>
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki