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: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Sachin Kamat 2012-11-19 09:44:59 +00:00 committed by Dave Airlie
parent 8c5eaca012
commit 66141d3d86
1 changed files with 1 additions and 4 deletions

View File

@ -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);
}
EXPORT_SYMBOL(drm_put_dev);