]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: comedi: jr3_pci: Don't ioremap too much space. Check result.
authorIan Abbott <abbotti@mev.co.uk>
Mon, 30 Nov 2009 10:59:27 +0000 (10:59 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Dec 2009 19:27:46 +0000 (11:27 -0800)
commitbed6d2c8ad990167643bd231fce0344302cd4c75
treeb0d5e18a0e01ffc29098ffdcc281ff2421568d39
parent038e13c72625fef54ed4af3a9c7ea42dabd99f44
Staging: comedi: jr3_pci: Don't ioremap too much space. Check result.

For the JR3/PCI cards, the size of the PCIBAR0 region depends on the
number of channels.  Don't try and ioremap space for 4 channels if the
card has fewer channels.  Also check for ioremap failure.

Thanks to Anders Blomdell for input and Sami Hussein for testing.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/jr3_pci.c