From patchwork Fri Jul 27 01:47:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Ranostay X-Patchwork-Id: 10546559 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 9B9AA112B for ; Fri, 27 Jul 2018 01:47:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AE0D2B89F for ; Fri, 27 Jul 2018 01:47:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F0962B8CC; Fri, 27 Jul 2018 01:47:33 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 256312B89F for ; Fri, 27 Jul 2018 01:47:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732059AbeG0DG7 (ORCPT ); Thu, 26 Jul 2018 23:06:59 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:40244 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731933AbeG0DG7 (ORCPT ); Thu, 26 Jul 2018 23:06:59 -0400 Received: by mail-pl0-f68.google.com with SMTP id s17-v6so1604899plp.7 for ; Thu, 26 Jul 2018 18:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id; bh=lQYm2Mf9EQqrAvZVPRlNAOa75KrORceATNki4fndBrk=; b=GsXpVDT4B061dyuv3GJeFfUu2NmJ6LH2NSfLooddPCZ3VVmBNTGgqtDMZ8r46CV5VD 7lsKqNgYnGEPapwma188MpzHyfsZBwAyPqSRnQpVgamxTISFTE890PpIeoDTYzhRCzM8 y8pGR/p1BMAkggbHoggcSCn+SMSNQqzY2bC4s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lQYm2Mf9EQqrAvZVPRlNAOa75KrORceATNki4fndBrk=; b=KZTnhGF1dR9Upf169OeYW2W+OXf5kP04VtA2KayZU2BEjdN9eQzaZiiZeEQdnFflz9 PXM9Ve/gqDhyNRQa5q3l2yUbhLO8YI2yz3LRUIjhmBpXKZ8qGb6/KZ1DalEowr+HBFbl pyXQZL65WAVMp2AxzWorzg2xHvqk7sYb9ZgmP7H0b9ykq6AfM1q6VuNtRlog3MY3GvUQ GTbqJtk0/C1rU4iGn9LOlZqD2yjxA8ArH5IOdKESyCCHrSiB7UYgMjoCzbQkptrk3XCZ 7Rn6UbFY2jslTv7O7Dl96VX6pMiZIVnRVxJpFUz7XryKEfMj0ORI43yr6WKCPNrDQdEg U+JA== X-Gm-Message-State: AOUpUlGRWMyGuyY1pzTpSHi6sv0dxUtXII/H5uDG7ADB8AfFH2Or8on0 rfVhGuiLfGXCUDTuH5lLlM/dIl1JSUE= X-Google-Smtp-Source: AAOMgpdN0nFfD0nTfDIugxM0CR+IMIgXONRb8g1z64L8YNjdArToSgyDY6q/PGJX++/F/Gc7sUT3kA== X-Received: by 2002:a17:902:9a83:: with SMTP id w3-v6mr4079173plp.75.1532656051481; Thu, 26 Jul 2018 18:47:31 -0700 (PDT) Received: from niteshade.hsd1.or.comcast.net ([2601:1c2:5000:8d45::3f0e]) by smtp.gmail.com with ESMTPSA id h4-v6sm2804951pgp.13.2018.07.26.18.47.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 18:47:30 -0700 (PDT) From: Matt Ranostay To: linux-media@vger.kernel.org Cc: Matt Ranostay Subject: [PATCH] media: video-i2c: hwmon: fix return value from amg88xx_hwmon_init() Date: Thu, 26 Jul 2018 18:47:24 -0700 Message-Id: <20180727014724.5933-1-matt.ranostay@konsulko.com> X-Mailer: git-send-email 2.17.1 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 PTR_ERR was making any pointer passed an error pointer, and should be replaced with PTR_ERR_OR_ZERO which checks if is an actual error condition. Signed-off-by: Matt Ranostay --- drivers/media/i2c/video-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index 7dc9338502e5..06d29d8f6be8 100644 --- a/drivers/media/i2c/video-i2c.c +++ b/drivers/media/i2c/video-i2c.c @@ -167,7 +167,7 @@ static int amg88xx_hwmon_init(struct video_i2c_data *data) void *hwmon = devm_hwmon_device_register_with_info(&data->client->dev, "amg88xx", data, &amg88xx_chip_info, NULL); - return PTR_ERR(hwmon); + return PTR_ERR_OR_ZERO(hwmon); } #else #define amg88xx_hwmon_init NULL