From patchwork Mon Jan 17 10:08:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasiliy Kulikov X-Patchwork-Id: 483511 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0HAAAxa008341 for ; Mon, 17 Jan 2011 10:10:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265Ab1AQKJn (ORCPT ); Mon, 17 Jan 2011 05:09:43 -0500 Received: from mail-ew0-f46.google.com ([209.85.215.46]:34325 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751903Ab1AQKIr (ORCPT ); Mon, 17 Jan 2011 05:08:47 -0500 Received: by mail-ew0-f46.google.com with SMTP id 5so2434744ewy.19 for ; Mon, 17 Jan 2011 02:08:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer; bh=8nAtTgrcdEz+T4q9D0B1c1gSuOLa3FwXfwT13M2OQvg=; b=xxMWhh+VnictTuaFyvYYgvFdMNzkzMidROq53XGHR4MOVjiqX2Y43MUPPvdey0ZiGM yJ7kYVrXahJJpKffMCI5Y0FcPxVjd37OYoBMvMV/EpJsy+1EL77UbDmv23heJ6lr1pZT NP2Pdm0k/52dbcx3KmYSAFeQ/aGfR/IffsgGA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=KUjE9Fc2/9DWuv4fpodjS+2vd1HsgVqbFaT7zPC7sgtuOwmVuQNeHUt8pFvTGnfMc3 a7vwHZMfGqVwd3cCN5AdKSSTddsl5215D0Nh1UnMkWmjytVteVwDkbnktP95LGGbvotF Ym3RrXlbkHD47qu0qUIkOGo4FwlsO571YMYCM= Received: by 10.213.33.77 with SMTP id g13mr3373827ebd.86.1295258925756; Mon, 17 Jan 2011 02:08:45 -0800 (PST) Received: from localhost (ppp85-140-161-155.pppoe.mtu-net.ru [85.140.161.155]) by mx.google.com with ESMTPS id v59sm3481942eeh.3.2011.01.17.02.08.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 17 Jan 2011 02:08:44 -0800 (PST) From: Vasiliy Kulikov To: kernel-janitors@vger.kernel.org Cc: Tony Lindgren , Russell King , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm: mach-omap2: potential NULL dereference Date: Mon, 17 Jan 2011 13:08:42 +0300 Message-Id: <1295258922-31242-1-git-send-email-segoon@openwall.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 17 Jan 2011 10:10:10 +0000 (UTC) diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 77ecebf..871bca9 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -260,7 +260,10 @@ static int sr_late_init(struct omap_sr *sr_info) if (sr_class->class_type == SR_CLASS2 && sr_class->notify_flags && sr_info->irq) { + ret = -ENOMEM; name = kzalloc(SMARTREFLEX_NAME_LEN + 1, GFP_KERNEL); + if (name == NULL) + goto error; strcpy(name, "sr_"); strcat(name, sr_info->voltdm->name); ret = request_irq(sr_info->irq, sr_interrupt,