]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/reset/core.c
reset: NULL deref on allocation failure
[karo-tx-linux.git] / drivers / reset / core.c
index a258277959b42886432b850ad1fc44fc8119c445..d1b6089a0ef82f57c9aece8b86168a336710b70d 100644 (file)
@@ -181,7 +181,7 @@ struct reset_control *reset_control_get(struct device *dev, const char *id)
 
        rstc = kzalloc(sizeof(*rstc), GFP_KERNEL);
        if (!rstc) {
-               module_put(rstc->rcdev->owner);
+               module_put(rcdev->owner);
                return ERR_PTR(-ENOMEM);
        }