]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/input/joystick/psxpad-spi.c
Input: Fix memory leak in psxpad_spi_probe
[mirror_ubuntu-bionic-kernel.git] / drivers / input / joystick / psxpad-spi.c
index 28b473f6cbb631e53d3268467a118ffabf6a9b6f..092096ee06b96c0cf6abe64e0fbc6d0fc624e906 100644 (file)
@@ -292,7 +292,7 @@ static int psxpad_spi_probe(struct spi_device *spi)
        if (!pad)
                return -ENOMEM;
 
-       pdev = input_allocate_polled_device();
+       pdev = devm_input_allocate_polled_device(&spi->dev);
        if (!pdev) {
                dev_err(&spi->dev, "failed to allocate input device\n");
                return -ENOMEM;