提交 6034bb22 编写于 作者: D Dan Carpenter 提交者: Philipp Zabel

reset: NULL deref on allocation failure

"rstc" is NULL here and we should use "rcdev" instead of "rstc->rcdev".
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
上级 61fc4131
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册