kfree() doesn't accept error pointers so I've set "str" to NULL on these
paths.
Fixes: fd3b36045c2c ("ALSA: xen-front: Read sound driver configuration from Xen store")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
str = xenbus_read(XBT_NIL, stream_path, XENSND_FIELD_TYPE, NULL);
if (IS_ERR(str)) {
ret = PTR_ERR(str);
+ str = NULL;
goto fail;
}
str = xenbus_read(XBT_NIL, stream_path, XENSND_FIELD_TYPE, NULL);
if (IS_ERR(str)) {
ret = PTR_ERR(str);
+ str = NULL;
goto fail;
}