From 408045afbdb46e109a1a44e67af688e9ddf7ad66 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Wed, 21 Dec 2005 15:21:36 -0700 Subject: [IA64] incorrect return from ia64_pci_legacy_write() The function ia64_pci_legacy_write() returns 0 for everything except errors. This return value gets sent back to the user from pci_write_legacy_io(), making it look like every write fails. The trivial patch below copies the behavior of the SGI sn machvec and does what would be expected from something implementing a write() function. Signed-off-by: Alex Williamson Signed-off-by: Tony Luck --- arch/ia64/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 20d76fa..30dbc98 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -700,7 +700,7 @@ int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size) */ int ia64_pci_legacy_write(struct pci_dev *bus, u16 port, u32 val, u8 size) { - int ret = 0; + int ret = size; switch (size) { case 1: -- cgit v1.1