From 3ad5b0818ed1ef44da5e9cf46f7a1eb12b2a3a7e Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Thu, 29 Dec 2011 14:54:47 -0500 Subject: [PATCH] ATA bus_manager: return value (signed) put in unsigned variable This might have been occulting an eventual error code. CID 4095. --- src/add-ons/kernel/bus_managers/ata/ATAModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/bus_managers/ata/ATAModule.cpp b/src/add-ons/kernel/bus_managers/ata/ATAModule.cpp index 82d6fae452..34c4b34492 100644 --- a/src/add-ons/kernel/bus_managers/ata/ATAModule.cpp +++ b/src/add-ons/kernel/bus_managers/ata/ATAModule.cpp @@ -172,7 +172,7 @@ ata_channel_added(device_node *parent) return B_ERROR; } - uint32 channelID = gDeviceManager->create_id(ATA_CHANNEL_ID_GENERATOR); + int32 channelID = gDeviceManager->create_id(ATA_CHANNEL_ID_GENERATOR); if (channelID < 0) { TRACE_ERROR("out of channel ids\n"); return B_ERROR; @@ -195,7 +195,7 @@ ata_channel_added(device_node *parent) // - ATA allows up to 256 blocks for LBA28 and 65535 for LBA48 // to fix specific drive bugs use ATAChannel::GetRestrictions() { B_DMA_MAX_TRANSFER_BLOCKS, B_UINT32_TYPE, { ui32: 0xffff } }, - { ATA_CHANNEL_ID_ITEM, B_UINT32_TYPE, { ui32: channelID } }, + { ATA_CHANNEL_ID_ITEM, B_UINT32_TYPE, { ui32: (uint32)channelID } }, { NULL } };