From patchwork Mon Mar 20 14:42:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cox X-Patchwork-Id: 9634347 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3A2C96020B for ; Mon, 20 Mar 2017 14:44:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C1621FF26 for ; Mon, 20 Mar 2017 14:44:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 209D6205AD; Mon, 20 Mar 2017 14:44:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD13F1FF26 for ; Mon, 20 Mar 2017 14:44:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754144AbdCTOmx (ORCPT ); Mon, 20 Mar 2017 10:42:53 -0400 Received: from mga06.intel.com ([134.134.136.31]:24064 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753744AbdCTOm1 (ORCPT ); Mon, 20 Mar 2017 10:42:27 -0400 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 20 Mar 2017 07:42:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,194,1486454400"; d="scan'208";a="238289630" Received: from acox1-desk1.ger.corp.intel.com ([10.252.22.109]) by fmsmga004.fm.intel.com with ESMTP; 20 Mar 2017 07:42:24 -0700 Subject: [PATCH 22/24] staging: atomisp: remove redudant condition in if-statement From: Alan Cox To: greg@kroah.com, linux-media@vger.kernel.org Date: Mon, 20 Mar 2017 14:42:23 +0000 Message-ID: <149002094250.17109.4699082985014190627.stgit@acox1-desk1.ger.corp.intel.com> In-Reply-To: <149002068431.17109.1216139691005241038.stgit@acox1-desk1.ger.corp.intel.com> References: <149002068431.17109.1216139691005241038.stgit@acox1-desk1.ger.corp.intel.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Daeseok Youn The V4L2_FIELD_ANY is zero, so the (!field) is same meaning with (field == V4L2_FIELD_ANY) in if-statement. Signed-off-by: Daeseok Youn Signed-off-by: Alan Cox --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c index 036413b..0a2df3d 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c @@ -5081,7 +5081,7 @@ atomisp_try_fmt_file(struct atomisp_device *isp, struct v4l2_format *f) depth = get_pixel_depth(pixelformat); - if (!field || field == V4L2_FIELD_ANY) + if (field == V4L2_FIELD_ANY) field = V4L2_FIELD_NONE; else if (field != V4L2_FIELD_NONE) { dev_err(isp->dev, "Wrong output field\n");