From patchwork Sat Jan 16 20:11:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12025021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A2A6C433DB for ; Sat, 16 Jan 2021 20:12:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05D7722CAE for ; Sat, 16 Jan 2021 20:12:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726597AbhAPUMA (ORCPT ); Sat, 16 Jan 2021 15:12:00 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:18242 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbhAPUL4 (ORCPT ); Sat, 16 Jan 2021 15:11:56 -0500 X-IronPort-AV: E=Sophos;i="5.79,352,1602540000"; d="scan'208";a="370224224" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2021 21:11:13 +0100 Date: Sat, 16 Jan 2021 21:11:13 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Paul Kocialkowski cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, =?iso-8859-15?q?K=E9vin_L=27h=F4pital?= , Sakari Ailus , linux-kernel@vger.kernel.org, Linux Memory Management List , kbuild-all@lists.01.org Subject: [PATCH] media: i2c: fix odd_ptr_err.cocci warnings Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: kernel test robot PTR_ERR should access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Fixes: 11c0d8fdccc5 ("media: i2c: Add support for the OV8865 image sensor") CC: Paul Kocialkowski Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Reviewed-by: Paul Kocialkowski --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b3a3cbdec55b090d22a09f75efb7c7d34cb97f25 commit: 11c0d8fdccc56fa15cb15906480b4737c31dd085 [2650/3956] media: i2c: Add support for the OV8865 image sensor :::::: branch date: 2 days ago :::::: commit date: 4 days ago ov8865.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/i2c/ov8865.c +++ b/drivers/media/i2c/ov8865.c @@ -2849,7 +2849,7 @@ static int ov8865_probe(struct i2c_clien sensor->avdd = devm_regulator_get(dev, "avdd"); if (IS_ERR(sensor->avdd)) { dev_err(dev, "cannot get AVDD (analog) regulator\n"); - ret = PTR_ERR(sensor->dvdd); + ret = PTR_ERR(sensor->avdd); goto error_endpoint; }