Commit b86caedd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull crypto fix from Herbert Xu:

 - Fix device reference leak in hisilicon

* tag 'v6.18-p5' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: hisilicon/qm - Fix device reference leak in qm_get_qos_value
parents 95baf63f 59b0afd0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3871,10 +3871,12 @@ static ssize_t qm_get_qos_value(struct hisi_qm *qm, const char *buf,
	pdev = container_of(dev, struct pci_dev, dev);
	if (pci_physfn(pdev) != qm->pdev) {
		pci_err(qm->pdev, "the pdev input does not match the pf!\n");
		put_device(dev);
		return -EINVAL;
	}

	*fun_index = pdev->devfn;
	put_device(dev);

	return 0;
}