Commit bc705c1e authored by Jan Kiszka's avatar Jan Kiszka Committed by Philippe Gerum

can: Fix compiler warning about missing braces

The NULL-test is currently performed also in case we assign a
pre-checked value from the master to base_addr. This is harmless, but
the compiler correctly complains about the misaligned code block - or
the missing braces.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 733a32b7
......@@ -158,14 +158,15 @@ static int rtcan_adv_pci_add_chan(struct pci_dev *pdev,
(struct rtcan_adv_pci *)(*master_dev)->board_priv;
master_board->slave_dev = dev;
if (offset)
if (offset) {
base_addr = master_board->base_addr+offset;
else
} else {
base_addr = pci_iomap(pdev, bar, ADV_PCI_BASE_SIZE);
if (!base_addr) {
ret = -EIO;
goto failure;
}
}
} else {
base_addr = pci_iomap(pdev, bar, ADV_PCI_BASE_SIZE) + offset;
if (!base_addr) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment