On Mon Aug 11 10:23:25 2025 +0300, Dmitry Antipov wrote:
> Revert commit 68594cec291f ("media: xc2028: avoid use-after-free
> in load_firmware_cb()") since it doesn't make sense to check
> dangling 'struct dvb_frontend *' passed to 'load_firmware_cb()'.
> 
> Signed-off-by: Dmitry Antipov <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/tuners/xc2028.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

---

diff --git a/drivers/media/tuners/xc2028.c b/drivers/media/tuners/xc2028.c
index 8e6638e5f688..807585d2dfde 100644
--- a/drivers/media/tuners/xc2028.c
+++ b/drivers/media/tuners/xc2028.c
@@ -1361,16 +1361,9 @@ static void load_firmware_cb(const struct firmware *fw,
                             void *context)
 {
        struct dvb_frontend *fe = context;
-       struct xc2028_data *priv;
+       struct xc2028_data *priv = fe->tuner_priv;
        int rc;
 
-       if (!fe) {
-               pr_warn("xc2028: No frontend in %s\n", __func__);
-               return;
-       }
-
-       priv = fe->tuner_priv;
-
        tuner_dbg("request_firmware_nowait(): %s\n", fw ? "OK" : "error");
        if (!fw) {
                tuner_err("Could not load firmware %s.\n", priv->fname);
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to