From patchwork Thu Feb 24 14:33:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 587681 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 p1OEdixM006531 for ; Thu, 24 Feb 2011 14:39:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756088Ab1BXOjc (ORCPT ); Thu, 24 Feb 2011 09:39:32 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:60994 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753604Ab1BXOjc (ORCPT ); Thu, 24 Feb 2011 09:39:32 -0500 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: TEXT/PLAIN Received: from spt2.w1.samsung.com ([210.118.77.13]) by mailout3.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0LH400BCIM1T9660@mailout3.w1.samsung.com>; Thu, 24 Feb 2011 14:39:30 +0000 (GMT) Received: from linux.samsung.com ([106.116.38.10]) by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LH400A2CM1TX6@spt2.w1.samsung.com>; Thu, 24 Feb 2011 14:39:29 +0000 (GMT) Received: from localhost.localdomain (davsrvsmtp01.bs.local [106.116.38.10]) by linux.samsung.com (Postfix) with ESMTP id 9640827004B; Thu, 24 Feb 2011 15:40:00 +0100 (CET) Date: Thu, 24 Feb 2011 15:33:49 +0100 From: Sylwester Nawrocki Subject: [PATCH 2/7] s5p-fimc: Prevent oops when i2c adapter is not available In-reply-to: <1298558034-10768-1-git-send-email-s.nawrocki@samsung.com> To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: m.szyprowski@samsung.com, kyungmin.park@samsung.com, kgene.kim@samsung.com, s.nawrocki@samsung.com Message-id: <1298558034-10768-3-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.2.3 References: <1298558034-10768-1-git-send-email-s.nawrocki@samsung.com> 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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 24 Feb 2011 14:39:44 +0000 (UTC) diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 10d6426..2d8002c 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c @@ -98,7 +98,7 @@ static int fimc_subdev_attach(struct fimc_dev *fimc, int index) continue; sd = fimc_subdev_register(fimc, isp_info); - if (sd) { + if (!IS_ERR_OR_NULL(sd)) { vid_cap->sd = sd; vid_cap->input_index = i;