From patchwork Thu Jan 7 07:15:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 7973881 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8371FBEEE5 for ; Thu, 7 Jan 2016 07:17:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C132520149 for ; Thu, 7 Jan 2016 07:17:45 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9F0F52015E for ; Thu, 7 Jan 2016 07:17:44 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id CFA6B26588F; Thu, 7 Jan 2016 08:17:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 7E79B2655D1; Thu, 7 Jan 2016 08:16:21 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3F4FB265759; Thu, 7 Jan 2016 08:16:20 +0100 (CET) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by alsa0.perex.cz (Postfix) with ESMTP id 0872A2655D1 for ; Thu, 7 Jan 2016 08:16:09 +0100 (CET) Received: by mail-pa0-f48.google.com with SMTP id uo6so233296045pac.1 for ; Wed, 06 Jan 2016 23:16:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bN3D3GZFjhR1BOfot37G2Ty9JLsvNV32SmOmm05naR8=; b=H+R4fhYvosTqKhSVzH7tBtlAs2f+Pmjx53NPQh4aG3WL9xqplEICTeJVJD468aAZVI 0Ej2XTHn+UrFHTy5716xUhIAgu194/fjo1Ryodqqxica66uBaNOMj/XH3uR2xfcFZ4u6 x/dzPnyOR4R2JYV852B71KXxT+ATqODF7zphG4np46RcRfSBnqm4oD1oCe2wCnftFSe8 6/F7h8m5MJCCjcliyv/q+fhOv2on+ylPljkk7Hhn+3Gt29SSbJQL4cxKewlr5To3nLIV ZIv8eMDzqi1+et4IQpa9T8m+tnVR/NITz6UPETZjZcgoMiJYtMpT7N66Jf/ywpG1ZfD7 EXpA== X-Received: by 10.66.136.101 with SMTP id pz5mr19508279pab.91.1452150968313; Wed, 06 Jan 2016 23:16:08 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([183.82.228.160]) by smtp.gmail.com with ESMTPSA id ah10sm149645792pad.23.2016.01.06.23.16.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jan 2016 23:16:07 -0800 (PST) From: Sudip Mukherjee To: Jaroslav Kysela , Takashi Iwai Date: Thu, 7 Jan 2016 12:45:49 +0530 Message-Id: <1452150951-1571-4-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452150951-1571-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1452150951-1571-1-git-send-email-sudipm.mukherjee@gmail.com> Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [alsa-devel] [PATCH 4/6] [ALSA] portman2x4 - NULL check X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of checking var == NULL, the kernel coding style recommends writing it as !var. Signed-off-by: Sudip Mukherjee --- sound/drivers/portman2x4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c index 65b0650..985cf67 100644 --- a/sound/drivers/portman2x4.c +++ b/sound/drivers/portman2x4.c @@ -105,7 +105,7 @@ static int portman_create(struct snd_card *card, *rchip = NULL; pm = kzalloc(sizeof(struct portman), GFP_KERNEL); - if (pm == NULL) + if (!pm) return -ENOMEM; /* Init chip specific data */ @@ -764,7 +764,7 @@ static int snd_portman_probe(struct platform_device *pdev) snd_portman_interrupt, /* ISR */ PARPORT_DEV_EXCL, /* flags */ (void *)card); /* private */ - if (pardev == NULL) { + if (!pardev) { snd_printd("Cannot register pardevice\n"); err = -EIO; goto __err;