From patchwork Mon Feb 15 15:30:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12088417 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 B74B8C4332B for ; Mon, 15 Feb 2021 15:32:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90E7F64ED7 for ; Mon, 15 Feb 2021 15:32:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230145AbhBOPcU (ORCPT ); Mon, 15 Feb 2021 10:32:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231203AbhBOPbH (ORCPT ); Mon, 15 Feb 2021 10:31:07 -0500 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D37CEC0613D6 for ; Mon, 15 Feb 2021 07:30:26 -0800 (PST) Received: by mail-lj1-x231.google.com with SMTP id u4so8219160ljh.6 for ; Mon, 15 Feb 2021 07:30:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Tw5kGX/wN0aLH+g+NvPcP8n/H7DznXIrgtDbZyQfeHU=; b=rjRU6U6SRdnWxqm5DLwVj+p6NHPTLkQ6WF2lHWITpkFPMpeufJlgNJXpzw0lfygO1B EolObpR3JYUczChlN8BJSYjPx7Pve1ClOcjbnnPpdqeeory8wwOzRCDIH9SpgvqFGdzA y7J9SKsOP/WS8+i353wr6ihWBXN84J+ksZpBryVcxknLb0qMUpbMNpJsprgbpP93FjO1 4EaFE/qrUsVejag5TtnvSjIqO9LaWTI8EF6uEIX/FYKRYeORvKduxBOrVIu+pYjRULoS bmADN//1gCc96RsKPIK6BIT/jb5hBl8Iys+vbWi4BQ+jhy7hFPFkrIAxwi3nBHD2pPe8 gWoA== 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:mime-version :content-transfer-encoding; bh=Tw5kGX/wN0aLH+g+NvPcP8n/H7DznXIrgtDbZyQfeHU=; b=IWc+X5nPogqUioF5ihtHksMxaaluyBSJsTEBE05Vzi2X3BwBCTSZliIEHD0nb9CNGa /8XZqQe9V1Oe/cT0BeHPTRyNHeq5OL4kG/yimH1eBtpHcwY4MYnyCSdLDrwXnY+Any7V yvs6JhqZePht9d/SgLBNXKzMtX3H3eIJrJcGyPAS+qyV+TTB38Fw0vRhtEX1hQBvZ8I7 MiqLuv0KLUB/tpC2lWfINe1rFb+989+/5DuJdlH8a3uiMMeUHmaXNeFDUPBbgvxJoVUX Wn7AIa4TDg7JkX9rRzdvS+oFxbEtJt8ENny8jw4iUoSqs+mZM94b8Sp6bYpDsaBzapj8 w3Hw== X-Gm-Message-State: AOAM531b7RMEbNuXAQM8T34+2NYXYNevzAcUN7QfCunpSbI6FpPHEPui fs34TMLKPS4wB1GNjdfCmRHwfg== X-Google-Smtp-Source: ABdhPJxuVIFMpJPt1pcGebXuNF9BKxSpAVHZiQBy9whACiHPkMcnQOtcHoLg7B4Hyjg+3v7QvuHyGg== X-Received: by 2002:a2e:ba18:: with SMTP id p24mr9418061lja.488.1613403025394; Mon, 15 Feb 2021 07:30:25 -0800 (PST) Received: from genomnajs.publikt.skane.se (host-78-76-89-148.homerun.telia.com. [78.76.89.148]) by smtp.gmail.com with ESMTPSA id n6sm395777lfi.92.2021.02.15.07.30.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 07:30:25 -0800 (PST) From: Linus Walleij To: Jonathan Cameron , linux-iio@vger.kernel.org Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Linus Walleij , kernel test robot , Dan Carpenter , Andy Shevchenko Subject: [PATCH 1/2] iio: magnetometer: yas530: Fix return value on errorpath Date: Mon, 15 Feb 2021 16:30:23 +0100 Message-Id: <20210215153023.47899-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org There was a missed return variable assignment in the default errorpath of the switch statement in yas5xx_probe(). Fix it. Reported-by: kernel test robot Reported-by: Dan Carpenter Suggested-by: Andy Shevchenko Signed-off-by: Linus Walleij --- drivers/iio/magnetometer/yamaha-yas530.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/magnetometer/yamaha-yas530.c b/drivers/iio/magnetometer/yamaha-yas530.c index d46f23d82b3d..cee6207d8847 100644 --- a/drivers/iio/magnetometer/yamaha-yas530.c +++ b/drivers/iio/magnetometer/yamaha-yas530.c @@ -887,6 +887,7 @@ static int yas5xx_probe(struct i2c_client *i2c, strncpy(yas5xx->name, "yas532", sizeof(yas5xx->name)); break; default: + ret = -ENODEV; dev_err(dev, "unhandled device ID %02x\n", yas5xx->devid); goto assert_reset; } From patchwork Mon Feb 15 15:30:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12088419 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 D5D3AC433E6 for ; Mon, 15 Feb 2021 15:33:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F28F64E8D for ; Mon, 15 Feb 2021 15:33:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230190AbhBOPc1 (ORCPT ); Mon, 15 Feb 2021 10:32:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231217AbhBOPbR (ORCPT ); Mon, 15 Feb 2021 10:31:17 -0500 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 413C6C061786 for ; Mon, 15 Feb 2021 07:30:36 -0800 (PST) Received: by mail-lj1-x22b.google.com with SMTP id c8so6008901ljd.12 for ; Mon, 15 Feb 2021 07:30:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RUzqONXw9UKNankFH42rC2qDQ/ZrQAInJYtzyvpkDqU=; b=fb+ExkF0hTzt7m75Msh0DjbiQCaurNGiZQ+BKts0XftbMjIGgqnt5No+eCyfbnt4Sv 4kVo5IWiUkP58o3AiqI201yYwq/xQBgLFj+eRL4XP7TTo6c1rOGiI8QY3qCDBQGG3MKU YLcu5ntqoPPMRi0FXr64q6w1w/7f+IvcXt1nRj6QnnOsJYTpjGRAV4wcBD61u0zxWXc8 VwuuNxtZEOR0hrfaojBCv9KbuGWQeQAVGNaT57DoWb/wNNpFoRuAkoKMPXgQh4XjO+97 ApaJ2ODQiebYYB4NI/ixMzOUKnZAUL3YwFg1qlMlopWhoEwHgV1+FPXOi7oRMysvvS1V uN3Q== 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:mime-version :content-transfer-encoding; bh=RUzqONXw9UKNankFH42rC2qDQ/ZrQAInJYtzyvpkDqU=; b=MZTqm9Du6nNEorHjC264miwPSvaUNuoD3rkOJ1nuRyRl1u1/sVs/t1C4k3oIEHW4oD JZIV+g1ukVDDx4e/i6tEWMS4dfSjcReki4xdPM5qMaQjXh+EQm80iKWmClk32y6JzGdA 1fP80r5xb0kPN4CRoqd00BaP1cnntsKDeX6OC2Un5AHd5iPstxJZOZWv6zSW9guAzU7x 5EiboCwlVOl98hPS5RX76Z+6wnwB5oexG8+FrTMqpzdDamCveh4tPg4f53V31pIG5c2U gjZeBWLh+Jp0QVhP2SlvA6YDYsExsL1WdEIwF1xK4O7VkMQgkt+uXxKqGh5u0jwgMArd IOKQ== X-Gm-Message-State: AOAM530UMwJYEPkDPdYuDkgeIVSlsFOkfcd2poItQsXiHRkdESaa4Lak R0WlQR3ZgtrjOllv35vVOoDxQg== X-Google-Smtp-Source: ABdhPJwSA14vxp9wUH305uO/ZS/uLbTz0gV5syvPctLzya7sUFPjBdzP6im7BbtL9CzSfcjijMu6Eg== X-Received: by 2002:a05:651c:1343:: with SMTP id j3mr8775204ljb.81.1613403034814; Mon, 15 Feb 2021 07:30:34 -0800 (PST) Received: from genomnajs.publikt.skane.se (host-78-76-89-148.homerun.telia.com. [78.76.89.148]) by smtp.gmail.com with ESMTPSA id d24sm2800609lfc.225.2021.02.15.07.30.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 07:30:34 -0800 (PST) From: Linus Walleij To: Jonathan Cameron , linux-iio@vger.kernel.org Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Linus Walleij , kernel test robot , Harvey Harrison Subject: [PATCH 2/2] iio: magnetometer: yas530: Inlucde right header Date: Mon, 15 Feb 2021 16:30:32 +0100 Message-Id: <20210215153032.47962-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org To get access to the big endian byte order parsing helpers drivers need to include and nothing else. Reported-by: kernel test robot Suggested-by: Harvey Harrison Signed-off-by: Linus Walleij --- drivers/iio/magnetometer/yamaha-yas530.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/magnetometer/yamaha-yas530.c b/drivers/iio/magnetometer/yamaha-yas530.c index cee6207d8847..2f2f8cb3c26c 100644 --- a/drivers/iio/magnetometer/yamaha-yas530.c +++ b/drivers/iio/magnetometer/yamaha-yas530.c @@ -32,13 +32,14 @@ #include #include #include -#include #include #include #include #include +#include + /* This register map covers YAS530 and YAS532 but differs in YAS 537 and YAS539 */ #define YAS5XX_DEVICE_ID 0x80 #define YAS5XX_ACTUATE_INIT_COIL 0x81