Skip to content

Commit b86caed

Browse files
committed
Merge tag 'v6.18-p5' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
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
2 parents 95baf63 + 59b0afd commit b86caed

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • drivers/crypto/hisilicon

drivers/crypto/hisilicon/qm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3871,10 +3871,12 @@ static ssize_t qm_get_qos_value(struct hisi_qm *qm, const char *buf,
38713871
pdev = container_of(dev, struct pci_dev, dev);
38723872
if (pci_physfn(pdev) != qm->pdev) {
38733873
pci_err(qm->pdev, "the pdev input does not match the pf!\n");
3874+
put_device(dev);
38743875
return -EINVAL;
38753876
}
38763877

38773878
*fun_index = pdev->devfn;
3879+
put_device(dev);
38783880

38793881
return 0;
38803882
}

0 commit comments

Comments
 (0)