From d84702a5d7b500ead8db129ddea789c88764f357 Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Tue, 20 Mar 2007 19:42:15 +0100 Subject: firewire: fix compiler warnings on 64bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/firewire/fw-device-cdev.c') diff --git a/drivers/firewire/fw-device-cdev.c b/drivers/firewire/fw-device-cdev.c index b1b7edb0d2ad..f9f268861418 100644 --- a/drivers/firewire/fw-device-cdev.c +++ b/drivers/firewire/fw-device-cdev.c @@ -274,10 +274,11 @@ static int ioctl_get_info(struct client *client, void __user *arg) if (get_info.rom != 0) { void __user *uptr = u64_to_uptr(get_info.rom); - size_t length = min(get_info.rom_length, - client->device->config_rom_length * 4); + size_t want = get_info.rom_length; + size_t have = client->device->config_rom_length * 4; - if (copy_to_user(uptr, client->device->config_rom, length)) + if (copy_to_user(uptr, client->device->config_rom, + min(want, have))) return -EFAULT; } get_info.rom_length = client->device->config_rom_length * 4; -- cgit v1.2.3