Re: [PATCH] PCI: ibmphp: fix get_max_bus_speed()

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

 



On Thu, Apr 19, 2018 at 01:05:49PM +0300, Dan Carpenter wrote:
> The "rc" variable is only initialized on the error path.  The caller
> doesn't check the return but, if "rc" is non-zero, then this function is
> basically a no-op.
> 
> Fixes: 3749c51ac6c1 ("PCI: Make current and maximum bus speeds part of the PCI core")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Applied to pci/hotplug for v4.18, thanks!

> diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
> index b81ca3fa0e84..1869b0411ce0 100644
> --- a/drivers/pci/hotplug/ibmphp_core.c
> +++ b/drivers/pci/hotplug/ibmphp_core.c
> @@ -379,7 +379,7 @@ static int get_adapter_present(struct hotplug_slot *hotplug_slot, u8 *value)
>  
>  static int get_max_bus_speed(struct slot *slot)
>  {
> -	int rc;
> +	int rc = 0;
>  	u8 mode = 0;
>  	enum pci_bus_speed speed;
>  	struct pci_bus *bus = slot->hotplug_slot->pci_slot->bus;
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux