If tcm doesn't get allocated then there is no need to kfree it. --- drivers/gpu/drm/omapdrm/tcm-sita.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/tcm-sita.c b/drivers/gpu/drm/omapdrm/tcm-sita.c index c10fdfc..8471722 100644 --- a/drivers/gpu/drm/omapdrm/tcm-sita.c +++ b/drivers/gpu/drm/omapdrm/tcm-sita.c @@ -237,7 +237,7 @@ struct tcm *sita_init(u16 width, u16 height) tcm = kzalloc(sizeof(*tcm) + map_size, GFP_KERNEL); if (!tcm) - goto error; + return NULL; /* Updating the pointers to SiTA implementation APIs */ tcm->height = height; @@ -254,8 +254,4 @@ struct tcm *sita_init(u16 width, u16 height) tcm->map_size = width*height; return tcm; - -error: - kfree(tcm); - return NULL; } -- 2.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html