Re: [PATCH -next] PCI: faraday: Fix wrong pointer passed to PTR_ERR()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 17, 2017 at 12:11:03PM +0000, Wei Yongjun wrote:
> PTR_ERR should access the value just tested by IS_ERR, otherwise
> the wrong error code will be returned.
> 
> Fixes: 2eeb02b28579 ("PCI: faraday: Add clock handling")
> Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx>

Applied with Linus' reviewed-by to pci/host-faraday for v4.15, thanks!

> ---
>  drivers/pci/host/pci-ftpci100.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/host/pci-ftpci100.c b/drivers/pci/host/pci-ftpci100.c
> index 06d9687..fae6bd1 100644
> --- a/drivers/pci/host/pci-ftpci100.c
> +++ b/drivers/pci/host/pci-ftpci100.c
> @@ -463,7 +463,7 @@ static int faraday_pci_probe(struct platform_device *pdev)
>  	}
>  	p->bus_clk = devm_clk_get(dev, "PCICLK");
>  	if (IS_ERR(p->bus_clk))
> -		return PTR_ERR(clk);
> +		return PTR_ERR(p->bus_clk);
>  	ret = clk_prepare_enable(p->bus_clk);
>  	if (ret) {
>  		dev_err(dev, "could not prepare PCICLK\n");
> 



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux