Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f357ee79 authored by Ganesh Keethol's avatar Ganesh Keethol
Browse files

soc: qcom: bgcom: fix dangling pointer on device shutdown



Make bgcom driver pointer as null on device shutdown.

Change-Id: I99b0334d8ccc59a9dc50ec148112a378b9664f3d
Signed-off-by: default avatarGanesh Keethol <gkeethol@codeaurora.org>
parent e8625404
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1050,6 +1050,7 @@ static int bg_spi_remove(struct spi_device *spi)
{
	struct bg_spi_priv *bg_spi = spi_get_drvdata(spi);

	bg_com_drv = NULL;
	mutex_destroy(&bg_spi->xfer_mutex);
	devm_kfree(&spi->dev, bg_spi);
	spi_set_drvdata(spi, NULL);