Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3420999imm; Tue, 17 Jul 2018 04:42:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc281LCUrWqNMU6BP1uJ2V27U5flf3TEkAKh5qgIJz6TfVf7fHv8+sJgyUEZzO86hqlzBWE X-Received: by 2002:a63:1315:: with SMTP id i21-v6mr1253418pgl.147.1531827773970; Tue, 17 Jul 2018 04:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531827773; cv=none; d=google.com; s=arc-20160816; b=Gvk1Nk/maScKN2SAcPufF2CSOUe5I+vI4TTsEIsiAHB9i2jHBHI9TXUgC76mVFkMF4 0YllbHQw6M4zFufjaOQSYIq73JDDLgQnzW7bIiKRelvkjBEPBYbB9nkUcHfOeKN0SvKp IWbUQFN2cIAGW1mrjbnXZpFJ/2F1Zbg8wBMDhDxp1XebDMki6u74Met75il09cCLHmxt g9XdnWpO1JrvI8doHVewqyiajtyeHqZOb2ItvS7qs+hnqCvDAHOZDogDKFQjUwkDuZZK DkWFVjJGTBW4ZWXwaYkn64eAm8QGLwvibLGOrThQEZ3V+7wcqB/glmZLRKQPnBlZ6OtC uiRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=zsxyWlJa5L1Gv7t8Xsms7pw8bNxF0HNNGy0CGtS1AO8=; b=LvTRQoO3cXtP5UHuokVBWj9v48xk8oclib8rXqBJiSImZJjJF/8QkinGMO6qcVKgKr WrYdAksMUlzJc/n1303msHkTAAaSCoQzMAL81kDIXxtm2Wg9wanJ1yMRI4vTljASouYh jWllwIdf78jnZKWYRd8rkPv96HBZMVgLruVcJsUflouJ8gwZYB/lXUbU2gX9f4ame958 6LvIH5R8ACxcBMMcGEGBl2BblqQLcoz26tn6oJUa+SJOwHqCEN/YplJz4BUSKoA72xKC XI18Nto1iAAYrqKai7BTGbc6togYIyAVyeAST0MRwWaf3FIm0dxK0LB4nOS0nqtiUW9U tDhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=av1CxqpN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h86-v6si740425pfj.120.2018.07.17.04.42.38; Tue, 17 Jul 2018 04:42:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=av1CxqpN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731241AbeGQMOK (ORCPT + 99 others); Tue, 17 Jul 2018 08:14:10 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:40438 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730897AbeGQMOJ (ORCPT ); Tue, 17 Jul 2018 08:14:09 -0400 Received: by mail-pf0-f194.google.com with SMTP id e13-v6so376848pff.7 for ; Tue, 17 Jul 2018 04:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=zsxyWlJa5L1Gv7t8Xsms7pw8bNxF0HNNGy0CGtS1AO8=; b=av1CxqpND9tL7sjaBogagecvcJetC3oAWvnNxypjEI9WMLUHQvnzFPijEUNYszrv2Z fcgFtSx4HGUNSPkiwnabYDd/biIqVS3DHhJwsJum1NrX618ChCI1fmYhoUwYl04EPMII EF4VtyW2IqiAaqIuji999n3sxPfB7zMbCPulTCS/56gRndKKCYvviemHYK5kZqFiHods UWlYqIj3DbrTP1N5EUHDcvmoPnQCC5vhPek2CV5FoT/pFNVklwgtm/pkpasDbpyZqmIH z9OyI6SgZCiyav+dRXcAhn9NFVAoNy5R9K1lQuKN3q8NkemfOrvDFM1IAQdG0++/eoYz 6FYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zsxyWlJa5L1Gv7t8Xsms7pw8bNxF0HNNGy0CGtS1AO8=; b=Z0FO5FdA0CI+wu2arJZEuX9xQQ5FcGJiUik7XKiU1JmgSsK7uzbUp/Zw18qf5rTQb+ p3Bz166pgKRdg13DpDa4H8r1idIYqRcbGKmftl2g5OzAD+NJAURglD5yehcpCWO/yaN/ cZoNlV4UuKbCAxxgMghCKx5yWh6T6QojFiwdk/CC5Z0Mo9ggx1h9SiOUe39TsM3vuct2 yC3+ugky9I6Q3DXqOUA9dyy1ALdSV8u+iMrUle+nCgAHaVa51VbbMf31Ga8a7YYUBWBK VwWP52GrBe/EuFpJWGrV8SOG/+51AeQuGk+GZTsxtlARwoLEdTi6FUPJzIkeT21A/Bov v8GA== X-Gm-Message-State: AOUpUlHZLH5xbP/7Q0CYcEWeNj3XXhSEo+NCvYs5uXuI+CH4m/zNQozX slS1XvFqOQF84HgKRk7CEJ+HvnW9 X-Received: by 2002:a62:748:: with SMTP id b69-v6mr302636pfd.177.1531827715681; Tue, 17 Jul 2018 04:41:55 -0700 (PDT) Received: from raghu-VirtualBox ([116.197.184.12]) by smtp.gmail.com with ESMTPSA id y132-v6sm1608095pfb.91.2018.07.17.04.41.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 04:41:54 -0700 (PDT) From: RAGHU Halharvi To: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Cc: RAGHU Halharvi , jhogan@kernel.org, ralf@linux-mips.org Subject: [PATCH] mips:sgi-ip22:Check return value from kzalloc Date: Tue, 17 Jul 2018 17:11:45 +0530 Message-Id: <20180717114145.21856-1-raghuhack78@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: RAGHU Halharvi --- arch/mips/sgi-ip22/ip22-gio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/sgi-ip22/ip22-gio.c b/arch/mips/sgi-ip22/ip22-gio.c index b225033aade6..5aaf40a1743b 100644 --- a/arch/mips/sgi-ip22/ip22-gio.c +++ b/arch/mips/sgi-ip22/ip22-gio.c @@ -363,6 +363,8 @@ static void ip22_check_gio(int slotno, unsigned long addr, int irq) printk(KERN_INFO "GIO: slot %d : %s (id %x)\n", slotno, name, id); gio_dev = kzalloc(sizeof *gio_dev, GFP_KERNEL); + if (!gio_dev) + return -ENOMEM; gio_dev->name = name; gio_dev->slotno = slotno; gio_dev->id.id = id; -- 2.17.1