From patchwork Fri Dec 7 20:30:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 1851631 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 3C9D1DF2EE for ; Fri, 7 Dec 2012 20:30:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424163Ab2LGUan (ORCPT ); Fri, 7 Dec 2012 15:30:43 -0500 Received: from mail-ea0-f202.google.com ([209.85.215.202]:39403 "EHLO mail-ea0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424112Ab2LGUan (ORCPT ); Fri, 7 Dec 2012 15:30:43 -0500 Received: by mail-ea0-f202.google.com with SMTP id j12so56372eaa.1 for ; Fri, 07 Dec 2012 12:30:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:cc:from:date:mime-version:content-type :content-transfer-encoding:message-id:x-gm-message-state; bh=eWQIhTA6LVZlzvAdznM+FC1loN8cBAOGYMLfhDe2HKc=; b=RqGjEe6mVZhT8j6kCr6SO8B+PecvR3fqyKGYDy6m7JbQUOGmhtVlmVEaccEMCI9dNg dOuFbXsex1uNqDbkmsXDjw3y+DZ8ntyYFYCA0nvJXTtf479zy51kJAuIS7ny6DBu9P+V MNWJkXjVa4Z5tBjo4IIEBrrP7lZr+D3UFR0HEMknDT7lElVwCmJgiY+0VbZZiRMs3Jws /puy160pP97hyp/YcHTRcXrGRUnbql9SGupFb4Eeb8RIy6SU1wt9+PZpu8vILenjWQGo oarqx6Ss28eb1L4lShIQzMQtvp1ebkEgmgB1RQXicFDCkFDXsuleHlg/Us8rYzY+hiwB LU0g== Received: by 10.14.224.201 with SMTP id x49mr6125751eep.5.1354912242088; Fri, 07 Dec 2012 12:30:42 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id g9si2734190eeo.1.2012.12.07.12.30.42 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 07 Dec 2012 12:30:42 -0800 (PST) Received: from localhost.localdomain (akpm.mtv.corp.google.com [172.17.130.154]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id BC222200057; Fri, 7 Dec 2012 12:30:40 -0800 (PST) Subject: [patch 2/2] drivers/video/console/softcursor.c: remove redundant NULL check before kfree() To: tomi.valkeinen@ti.com Cc: linux-fbdev@vger.kernel.org, akpm@linux-foundation.org, sachin.kamat@linaro.org, FlorianSchandinat@gmx.de From: akpm@linux-foundation.org Date: Fri, 07 Dec 2012 12:30:39 -0800 MIME-Version: 1.0 Message-Id: <20121207203040.BC222200057@hpza10.eem.corp.google.com> X-Gm-Message-State: ALoCoQmaqZd4sd8IROjsDlr0TflBek0m8aAQnu/qsdrxvPR6W865fPikedoESv8PdhkvodSQnJek Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org From: Sachin Kamat Subject: drivers/video/console/softcursor.c: remove redundant NULL check before kfree() Signed-off-by: Sachin Kamat Cc: Florian Tobias Schandinat Cc: Tomi Valkeinen Signed-off-by: Andrew Morton --- drivers/video/console/softcursor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -puN drivers/video/console/softcursor.c~drivers-video-console-softcursorc-remove-redundant-null-check-before-kfree drivers/video/console/softcursor.c --- a/drivers/video/console/softcursor.c~drivers-video-console-softcursorc-remove-redundant-null-check-before-kfree +++ a/drivers/video/console/softcursor.c @@ -35,8 +35,7 @@ int soft_cursor(struct fb_info *info, st dsize = s_pitch * cursor->image.height; if (dsize + sizeof(struct fb_image) != ops->cursor_size) { - if (ops->cursor_src != NULL) - kfree(ops->cursor_src); + kfree(ops->cursor_src); ops->cursor_size = dsize + sizeof(struct fb_image); ops->cursor_src = kmalloc(ops->cursor_size, GFP_ATOMIC);