If keydir is not provided but name is we want to use name as key_id.
But with the current coding name is only used on its own if it is NULL
and keydir is provided which never occurs.
Fixes: 16840b08c02b ("lib/rsa: Use the 'keyfile' argument from mkimage")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
snprintf(key_id, sizeof(key_id),
"%s%s",
keydir, name);
- else if (keydir)
+ else if (name)
snprintf(key_id, sizeof(key_id),
"%s",
name);