From patchwork Fri Jun 7 13:56:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10981863 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2949B1398 for ; Fri, 7 Jun 2019 13:56:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1680F289FA for ; Fri, 7 Jun 2019 13:56:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A44528A53; Fri, 7 Jun 2019 13:56:47 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B69BC28C35 for ; Fri, 7 Jun 2019 13:56:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=gN1nGu8uCqKmsMneEfQ8BXfd/kbfXlIgYSDnA6JaD8U=; b=UX9H2hnRiOIppF 4rsaazSmLZI3O3Zfd1UWMg/idbl9rYJ3Qu77TMNI8E44NWZLKmqi7FhWHmYNVXT33MUysT6zbvQyu 3D/fQPj7pX1r0Dwro2WV+N75HBDYDJORgyk8TrtkztL99949tOXKUKMi+1mWso7oX2tP3IqF7TFZ6 0yqf+TmpXEgP0f2a91MEBqkmparS0JzC/9XL+N991Fo6+Nov8BJ6Oj+AYPomXWn+H7D03F8bcj52L pxRHdoSaZTTo59XsWQaogcVLn1I5jm/q73+LZzPWnUr1DTCjKzDsT8vN5NhqmBFjslnXvDsK9EDfx Nv2gwlme0wxB15Qy3A9A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hZFMH-0004bo-SB; Fri, 07 Jun 2019 13:56:41 +0000 Received: from aserp2130.oracle.com ([141.146.126.79]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hZFME-0004Wg-33 for linux-rockchip@lists.infradead.org; Fri, 07 Jun 2019 13:56:39 +0000 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x57DmTei007580; Fri, 7 Jun 2019 13:56:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=sl3r5jCoha9AwpUHzlc6e/+sE+z9uZcaWIv3yOHjo/U=; b=FhH4IGw/pdnGDeWhTainIQBB9WIENv5+snDCsoDhr/gqFmabWxYjNAifT5vZlWzes7u7 oNsn5HTp/NSQ/SnbuWtm5ZqMXnM7WTmsFL/PvewZzN07ZSO2+BPAZKpMaoAuCPDyN/pe zcts1m5Px3dN8sEr/a/JXNynlu7QMDg60HSnUF/kycqFu9ySAcuJjGoKaKdqSsj5XsQo wDbIry9tEmQlZYUbKgpp8/W19noRgLkZknWkUT4Es4kjT5ML+VNajzb/jKPb0YfUDryH PWbryA0gShX4TgoL4IZRJep7468SgKqtE3Qtcse+v7RAL/t+rlWObFY/C8bcN4mM1Wm+ tA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2130.oracle.com with ESMTP id 2suevdxp6n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 Jun 2019 13:56:30 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x57Du7ss129194; Fri, 7 Jun 2019 13:56:29 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 2swngk1d8d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 Jun 2019 13:56:29 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x57DuHwg017850; Fri, 7 Jun 2019 13:56:19 GMT Received: from mwanda (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 07 Jun 2019 06:56:17 -0700 Date: Fri, 7 Jun 2019 16:56:09 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab , Boris Brezillon Subject: [PATCH] media: rockchip/vpu: remove an unnecessary NULL check Message-ID: <20190607135609.GA16718@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9280 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906070098 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9280 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906070098 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190607_065638_234867_F3E69D9C X-CRM114-Status: GOOD ( 14.65 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , kernel-janitors@vger.kernel.org, linux-rockchip@lists.infradead.org, Hans Verkuil , Ezequiel Garcia , linux-media@vger.kernel.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Thus the address of "&ctx->dev->variant->codec_ops[codec_mode]" can't possibly be NULL. Signed-off-by: Dan Carpenter Reviewed-by: Boris Brezillon --- drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.c index 1b80a45df8fe..42f4eb0abc8a 100644 --- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.c +++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.c @@ -619,7 +619,7 @@ static int rockchip_vpu_start_streaming(struct vb2_queue *q, vpu_debug(4, "Codec mode = %d\n", codec_mode); ctx->codec_ops = &ctx->dev->variant->codec_ops[codec_mode]; - if (ctx->codec_ops && ctx->codec_ops->init) + if (ctx->codec_ops->init) ret = ctx->codec_ops->init(ctx); }