]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
comedi: ni_at_ao: Add sanity checks for I/O base address
authorIan Abbott <abbotti@mev.co.uk>
Fri, 30 Jan 2026 16:47:53 +0000 (16:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 13:49:39 +0000 (15:49 +0200)
commitf0995260a89e5a59cc9e24749c50ec20ec907dbc
tree6db4e4ea13ce896e87c481f02670c1ceb9f12266
parent3389e476ec87fd210eaa0b071e148c8dbe0515ba
comedi: ni_at_ao: Add sanity checks for I/O base address

The "ni_at_ao" driver uses an admin-supplied configuration option
(`it->options[0]`) to configure the I/O port base address of an AT-AO-6
or AT-AO-10 board.  It currently allows any base address to be
configured but the hardware only supports base addresses (configured by
on-board jumpers) in the range 0 to 0x3E0 on 32-byte boundaries.

Add a sanity check to ensure the device is not configured at an
unsupported base address.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://patch.msgid.link/20260130170416.49994-29-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/comedi/drivers/ni_at_ao.c