From: Dan Carpenter Date: Fri, 8 Jul 2011 08:45:32 +0000 (+0100) Subject: gma500: reversed test in mdfld_dbi_dsr_exit() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d75758b3d12b45fc7535083a968b3a99935c9d9a;p=linux-beck.git gma500: reversed test in mdfld_dbi_dsr_exit() We should only cleanup "dsr_info" if it's non-NULL obviously and not the other way around. Signed-off-by: Dan Carpenter Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/gma500/mdfld_dsi_dbi.c b/drivers/staging/gma500/mdfld_dsi_dbi.c index 9d2d97db1961..489734553317 100644 --- a/drivers/staging/gma500/mdfld_dsi_dbi.c +++ b/drivers/staging/gma500/mdfld_dsi_dbi.c @@ -642,7 +642,7 @@ void mdfld_dbi_dsr_exit(struct drm_device *dev) struct drm_psb_private *dev_priv = dev->dev_private; struct mdfld_dbi_dsr_info *dsr_info = dev_priv->dbi_dsr_info; - if (!dsr_info) { + if (dsr_info) { del_timer_sync(&dsr_info->dsr_timer); kfree(dsr_info); dev_priv->dbi_dsr_info = NULL;