]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath9k: use non devm for nvmem_cell_get
authorRosen Penev <rosenp@gmail.com>
Mon, 23 Feb 2026 02:50:20 +0000 (18:50 -0800)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 30 Apr 2026 21:24:06 +0000 (14:24 -0700)
There's absolutely no need to extend the lifetime of cell to post
removal of the driver. It's only used in this function.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Link: https://patch.msgid.link/20260223025021.19008-1-rosenp@gmail.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath9k/init.c

index ee951493e993739a60d0dba6a41639dc3a4028f6..ebd46307938838909ee03d040a95b76a89c3cb05 100644 (file)
@@ -576,7 +576,7 @@ static int ath9k_nvmem_request_eeprom(struct ath_softc *sc)
        size_t len;
        int err;
 
-       cell = devm_nvmem_cell_get(sc->dev, "calibration");
+       cell = nvmem_cell_get(sc->dev, "calibration");
        if (IS_ERR(cell)) {
                err = PTR_ERR(cell);
 
@@ -593,6 +593,7 @@ static int ath9k_nvmem_request_eeprom(struct ath_softc *sc)
        }
 
        buf = nvmem_cell_read(cell, &len);
+       nvmem_cell_put(cell);
        if (IS_ERR(buf))
                return PTR_ERR(buf);