diff options
Diffstat (limited to 'pcilib')
-rw-r--r-- | pcilib/register.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pcilib/register.c b/pcilib/register.c index f10e29b..347bf7c 100644 --- a/pcilib/register.c +++ b/pcilib/register.c @@ -160,7 +160,7 @@ int pcilib_read_register(pcilib_t *ctx, const char *bank, const char *regname, p int reg; reg = pcilib_find_register(ctx, bank, regname); - if (reg < 0) { + if (reg == PCILIB_REGISTER_INVALID) { pcilib_error("Register (%s) is not found", regname); return PCILIB_ERROR_NOTFOUND; } @@ -291,7 +291,7 @@ int pcilib_write_register(pcilib_t *ctx, const char *bank, const char *regname, int reg; reg = pcilib_find_register(ctx, bank, regname); - if (reg < 0) { + if (reg == PCILIB_REGISTER_INVALID) { pcilib_error("Register (%s) is not found", regname); return PCILIB_ERROR_NOTFOUND; } |