提交 66141d3d 编写于 作者: S Sachin Kamat 提交者: Dave Airlie

drm/drm_stub: Remove unnecessary null check before kfree.

kfree on a null argument is a no-op.
Silences the following smatch warning:
drivers/gpu/drm/drm_stub.c:496 drm_put_dev() info:
redundant null check on dev->devname calling kfree()
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 8c5eaca0
......@@ -492,10 +492,7 @@ void drm_put_dev(struct drm_device *dev)
drm_put_minor(&dev->primary);
list_del(&dev->driver_item);
if (dev->devname) {
kfree(dev->devname);
dev->devname = NULL;
}
kfree(dev->devname);
kfree(dev);
}
EXPORT_SYMBOL(drm_put_dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册