Commit 4e087a7a authored by Jesper Juhl's avatar Jesper Juhl Committed by Dave Airlie

gpu, drm, sis: Don't return uninitialized variable from sis_driver_load()

In sis_driver_load(), the only use of 'ret' is as the return value
from the function, unfortunately it is never initialized, so the
function just returns garbage when it succeeds.
To fix that, remove the variable and just return 0 directly on success.
Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent dcd6c922
...@@ -40,7 +40,6 @@ static struct pci_device_id pciidlist[] = { ...@@ -40,7 +40,6 @@ static struct pci_device_id pciidlist[] = {
static int sis_driver_load(struct drm_device *dev, unsigned long chipset) static int sis_driver_load(struct drm_device *dev, unsigned long chipset)
{ {
drm_sis_private_t *dev_priv; drm_sis_private_t *dev_priv;
int ret;
dev_priv = kzalloc(sizeof(drm_sis_private_t), GFP_KERNEL); dev_priv = kzalloc(sizeof(drm_sis_private_t), GFP_KERNEL);
if (dev_priv == NULL) if (dev_priv == NULL)
...@@ -50,7 +49,7 @@ static int sis_driver_load(struct drm_device *dev, unsigned long chipset) ...@@ -50,7 +49,7 @@ static int sis_driver_load(struct drm_device *dev, unsigned long chipset)
dev_priv->chipset = chipset; dev_priv->chipset = chipset;
idr_init(&dev->object_name_idr); idr_init(&dev->object_name_idr);
return ret; return 0;
} }
static int sis_driver_unload(struct drm_device *dev) static int sis_driver_unload(struct drm_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment