lkml.org 
[lkml]   [2022]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] virt: vmgenid: add support for generation counter
On Wed, Aug 03, 2022 at 05:21:27PM +0200, bchalios@amazon.es wrote:
> + /* Backwards compatibility. If CTRA is not there we just don't expose
> + * the char device

Backwards compatibility with what?

> + */
> + ret = parse_vmgenid_address(device, "CTRA", &state->gen_cntr_addr);
> + if (ret)
> + return 0;
> +
> + state->next_counter = devm_memremap(&device->dev, state->gen_cntr_addr,
> + sizeof(u32), MEMREMAP_WB);
> + if (IS_ERR(state->next_counter))
> + return 0;

This too is an error, you can not return with "all is good", right?
Once you try to create this device because the address is present, you
can't just give up and succeed no matter what went wrong, that seems
incorrect.

thanks,

greg k-h

\
 
 \ /
  Last update: 2022-08-03 17:33    [W:0.155 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site