ACK: [PATCH] opal: cpu_info: remove redundant initialization of prop_string to NULL

Alex Hung alex.hung at canonical.com
Wed Jan 25 07:21:14 UTC 2017


On 2017-01-24 08:29 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> prop_string is initialized to NULL and then re-assigned immediately
> afterwards.  Remove the redundant initialization.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/opal/cpu_info.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/opal/cpu_info.c b/src/opal/cpu_info.c
> index 1d5ec3c..22cccbf 100644
> --- a/src/opal/cpu_info.c
> +++ b/src/opal/cpu_info.c
> @@ -34,9 +34,8 @@ static int get_xscom_property(fwts_framework *fw,
>  {
>  	int node, prop_len, failures = 0;
>  	const char *prop_buf;
> -	char *prop_string = NULL;
> +	char *prop_string = strstr(my_path, "/xscom");
>
> -	prop_string = strstr(my_path, "/xscom");
>  	if (prop_string) {
>  		node = fdt_path_offset(fw->fdt, prop_string);
>  		if (node >= 0) {
>


Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list