From patchwork Sat Feb 6 08:43:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 77502 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o168iZxw032593 for ; Sat, 6 Feb 2010 08:44:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754464Ab0BFIoE (ORCPT ); Sat, 6 Feb 2010 03:44:04 -0500 Received: from mgw1.diku.dk ([130.225.96.91]:52518 "EHLO mgw1.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753941Ab0BFIoA (ORCPT ); Sat, 6 Feb 2010 03:44:00 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw1.diku.dk (Postfix) with ESMTP id C5C1252C3A8; Sat, 6 Feb 2010 09:43:59 +0100 (CET) X-Virus-Scanned: amavisd-new at diku.dk Received: from mgw1.diku.dk ([127.0.0.1]) by localhost (mgw1.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hc3N+kuiVUOz; Sat, 6 Feb 2010 09:43:58 +0100 (CET) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw1.diku.dk (Postfix) with ESMTP id 8DAC952C384; Sat, 6 Feb 2010 09:43:58 +0100 (CET) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id B8B066DF8AC; Sat, 6 Feb 2010 09:38:55 +0100 (CET) Received: by ask.diku.dk (Postfix, from userid 3767) id 57A36200AA; Sat, 6 Feb 2010 09:43:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ask.diku.dk (Postfix) with ESMTP id 4F1D7200A9; Sat, 6 Feb 2010 09:43:58 +0100 (CET) Date: Sat, 6 Feb 2010 09:43:58 +0100 (CET) From: Julia Lawall To: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 7/11] drivers/media: Correct NULL test Message-ID: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 06 Feb 2010 08:44:35 +0000 (UTC) diff --git a/drivers/media/dvb/frontends/stv0900_core.c b/drivers/media/dvb/frontends/stv0900_core.c index 74791d5..9052a9b 100644 --- a/drivers/media/dvb/frontends/stv0900_core.c +++ b/drivers/media/dvb/frontends/stv0900_core.c @@ -1410,11 +1410,6 @@ static enum fe_stv0900_error stv0900_init_internal(struct dvb_frontend *fe, return error; } - if (state->internal == NULL) { - error = STV0900_INVALID_HANDLE; - return error; - } - intp = state->internal; intp->demod_mode = p_init->demod_mode; diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c index 551ddf2..933ae4c 100644 --- a/drivers/media/video/cpia.c +++ b/drivers/media/video/cpia.c @@ -3737,9 +3737,6 @@ static int cpia_mmap(struct file *file, struct vm_area_struct *vma) if (size > FRAME_NUM*CPIA_MAX_FRAME_SIZE) return -EINVAL; - if (!cam || !cam->ops) - return -ENODEV; - /* make this _really_ smp-safe */ if (mutex_lock_interruptible(&cam->busy_lock)) return -EINTR;