[PATCH v2 36/46] spi: zynqmp_gqspi: Fix not calling dev_err with a device

Michal Simek michal.simek at xilinx.com
Wed Sep 16 09:45:00 CEST 2020


Hi,

On 15. 09. 20 16:45, Sean Anderson wrote:
> Use `bus` instead of `dev`.
> 
> Signed-off-by: Sean Anderson <seanga2 at gmail.com>
> ---
> 
> Changes in v2:
> - New
> 
>  drivers/spi/zynqmp_gqspi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c
> index a72986be90..e0e6687037 100644
> --- a/drivers/spi/zynqmp_gqspi.c
> +++ b/drivers/spi/zynqmp_gqspi.c
> @@ -346,20 +346,20 @@ static int zynqmp_qspi_probe(struct udevice *bus)
>  
>  	ret = clk_get_by_index(bus, 0, &clk);
>  	if (ret < 0) {
> -		dev_err(dev, "failed to get clock\n");
> +		dev_err(bus, "failed to get clock\n");
>  		return ret;
>  	}
>  
>  	clock = clk_get_rate(&clk);
>  	if (IS_ERR_VALUE(clock)) {
> -		dev_err(dev, "failed to get rate\n");
> +		dev_err(bus, "failed to get rate\n");
>  		return clock;
>  	}
>  	debug("%s: CLK %ld\n", __func__, clock);
>  
>  	ret = clk_enable(&clk);
>  	if (ret && ret != -ENOSYS) {
> -		dev_err(dev, "failed to enable clock\n");
> +		dev_err(bus, "failed to enable clock\n");
>  		return ret;
>  	}
>  	plat->frequency = clock;
> 

Good catch.

Reviewed-by: Michal Simek <michal.simek at xilinx.com>

Thanks,
Michal



More information about the U-Boot mailing list