From patchwork Sat Aug 4 18:12:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devendra Naga X-Patchwork-Id: 1273961 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 328753FD2B for ; Sat, 4 Aug 2012 18:12:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753911Ab2HDSMN (ORCPT ); Sat, 4 Aug 2012 14:12:13 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:46878 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753968Ab2HDSMM (ORCPT ); Sat, 4 Aug 2012 14:12:12 -0400 Received: by pbbrr13 with SMTP id rr13so181172pbb.19 for ; Sat, 04 Aug 2012 11:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=3JHeB5gW1wEOA7GlqPmq/Cko+6BSBUdvzJIZMDPa4fk=; b=tfUqzxiQWfgpm1hsexVnslkH7Ptro6wl/cV3sBLbh/kqQhtZg/FSnUwC+jufmAabJ9 77Kne3F04q6tcSMvZEPV6GNNafWLM1rAvuExaR3L4dWgG9+f1SkUQ23EiwRP8SZayknN 1cEPuzvc1rGfR/1CF6bnMIyL5i6EKSx4XEaenjX2Oo9vR3aS/L7RPxdISFptycb48Wr/ WqovrNbbW45eXusysN/dJu+ltP9yTApY5SeXrBWu+qJ1pnu6jTSee+OXUY0rwpiputvp JMNrIaa6rUlmFqZpu6GzEayzAzpGPUXfRkKPZj8ZA1qxqZt162MaL3eLBTimWj90Gw4i cPnw== Received: by 10.68.190.102 with SMTP id gp6mr6692108pbc.5.1344103931987; Sat, 04 Aug 2012 11:12:11 -0700 (PDT) Received: from localhost.localdomain ([122.172.25.97]) by mx.google.com with ESMTPS id qi8sm5373597pbc.36.2012.08.04.11.12.09 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Aug 2012 11:12:11 -0700 (PDT) From: Devendra Naga To: Mauro Carvalho Chehab , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Devendra Naga Subject: [PATCH 1/2] staging: media: cxd2099: fix sparse warnings in cxd2099_attach Date: Sat, 4 Aug 2012 23:57:03 +0545 Message-Id: <1344103923-22616-1-git-send-email-develkernel412222@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The following sparse warnings were fixed drivers/staging/media/cxd2099/cxd2099.c:686:26: warning: Using plain integer as NULL pointer drivers/staging/media/cxd2099/cxd2099.c:691:24: warning: Using plain integer as NULL pointer drivers/staging/media/cxd2099/cxd2099.c:696:24: warning: Using plain integer as NULL pointer Signed-off-by: Devendra Naga --- drivers/staging/media/cxd2099/cxd2099.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/cxd2099/cxd2099.c b/drivers/staging/media/cxd2099/cxd2099.c index 1c04185..1678503 100644 --- a/drivers/staging/media/cxd2099/cxd2099.c +++ b/drivers/staging/media/cxd2099/cxd2099.c @@ -683,17 +683,17 @@ struct dvb_ca_en50221 *cxd2099_attach(struct cxd2099_cfg *cfg, void *priv, struct i2c_adapter *i2c) { - struct cxd *ci = 0; + struct cxd *ci; u8 val; if (i2c_read_reg(i2c, cfg->adr, 0, &val) < 0) { printk(KERN_INFO "No CXD2099 detected at %02x\n", cfg->adr); - return 0; + return NULL; } ci = kmalloc(sizeof(struct cxd), GFP_KERNEL); if (!ci) - return 0; + return NULL; memset(ci, 0, sizeof(*ci)); mutex_init(&ci->lock);