提交 8d06cd0a 编写于 作者: T Thomas Meyer 提交者: Dave Airlie

drm: Cocci spatch "memdup.spatch"

Signed-off-by: NThomas Meyer <thomas@m3y3r.de>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 edee06b6
......@@ -186,12 +186,11 @@ static u8 *edid_load(struct drm_connector *connector, char *name,
goto relfw_out;
}
edid = kmalloc(fwsize, GFP_KERNEL);
edid = kmemdup(fwdata, fwsize, GFP_KERNEL);
if (edid == NULL) {
err = -ENOMEM;
goto relfw_out;
}
memcpy(edid, fwdata, fwsize);
if (!drm_edid_block_valid(edid, 0, print_bad_edid)) {
connector->bad_edid_counter++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册