Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

remoteproc: qcom_wcnss_iris: Add missing put_device() on error in probe

The device_del() call matches with the device_add() but we also need
to call put_device() to trigger the qcom_iris_release().

Fixes: 1fcef985c8bd ("remoteproc: qcom: wcnss: Fix race with iris probe")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/4604f7e0-3217-4095-b28a-3ff8b5afad3a@stanley.mountain
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Dan Carpenter and committed by
Bjorn Andersson
0cb4b1b9 b170eb0d

+2
+2
drivers/remoteproc/qcom_wcnss_iris.c
··· 196 196 197 197 err_device_del: 198 198 device_del(&iris->dev); 199 + put_device(&iris->dev); 199 200 200 201 return ERR_PTR(ret); 201 202 } ··· 204 203 void qcom_iris_remove(struct qcom_iris *iris) 205 204 { 206 205 device_del(&iris->dev); 206 + put_device(&iris->dev); 207 207 }