diff options
author | Helge Deller <deller@gmx.de> | 2016-08-02 16:26:23 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2016-08-02 16:44:33 +0200 |
commit | 49ea1480f433d7673715f471c10f05bb08d49205 (patch) | |
tree | 4c227776c0672cc2af761bffa99cea25f6f69569 /arch | |
parent | 773e1c5fa4bf1faa25e119490b26ece2ef1bdb46 (diff) | |
download | blackbird-op-linux-49ea1480f433d7673715f471c10f05bb08d49205.tar.gz blackbird-op-linux-49ea1480f433d7673715f471c10f05bb08d49205.zip |
parisc: Add break statements to pdc_pat_io_pci_cfg_read()
Dan Carpenter noticed that pdc_pat_io_pci_cfg_read() is problematic
because it's missing some break statements so it copies 4 bytes
regardless of whether you asked for only 1 or 2.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/kernel/firmware.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 22395901d47b..e5d71905cad5 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -1354,9 +1354,9 @@ int pdc_pat_io_pci_cfg_read(unsigned long pci_addr, int pci_size, u32 *mem_addr) retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_PCI_CONFIG_READ, __pa(pdc_result), pci_addr, pci_size); switch(pci_size) { - case 1: *(u8 *) mem_addr = (u8) pdc_result[0]; - case 2: *(u16 *)mem_addr = (u16) pdc_result[0]; - case 4: *(u32 *)mem_addr = (u32) pdc_result[0]; + case 1: *(u8 *) mem_addr = (u8) pdc_result[0]; break; + case 2: *(u16 *)mem_addr = (u16) pdc_result[0]; break; + case 4: *(u32 *)mem_addr = (u32) pdc_result[0]; break; } spin_unlock_irqrestore(&pdc_lock, flags); |