Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5347944pxb; Mon, 15 Feb 2021 17:26:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/40+3/uBs9Ic3G//qxdQs4wjBZ24zhmX7+tgv7AZasKCXDqHX9ExBke93cPRGFSZtVLQy X-Received: by 2002:a17:906:3395:: with SMTP id v21mr18056731eja.331.1613438802390; Mon, 15 Feb 2021 17:26:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613438802; cv=none; d=google.com; s=arc-20160816; b=TJ3s4aBc4JlfjT7a/+zchZMJ1U4oET1IUDrgGek6nykjTiFnb7L7qpJf4ayE5MPqNJ ENFfbmuvX8oW9LLQ7GDcl89tY0sfeuquK5vc5OAA2kPXYQGjnEbBa9M7wdTsBB7Oswi/ hHoXBINkRAbmEXrgBcTlJ5KlDLSONTakZYW6xMtyODXqRh6NnnCWIoPvvZLyUOTMMqxJ NcCOKfaJo1D14/KMMUDxubflhgSHw0sxeBjTvC1AjhTAG9A8Ly9de++wKIKF5J0hA7Fd 2R8zSpD39VQEN1MRkgts7/7YJ/vyybxmKsjOfvoYJ9RpjlcwFsZ8A+gF9XBJKBibS/Ms ZfUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=PJye+kSqwOydCXOrUXNte65cKiZnVuosg0HZqWH3+fk=; b=U+42Wh+2qD8F/m6C1QhkAxRBW7y9LK2sgkKb+8VxHkUM9IKdFfQze+TducNyJbyega 8bPdy7JWBDOvDXGHk3UaZwsVULH/gq5Kj0higA9l6uyPSAyaB0s+nAuZdJBTMjAo+V3w j9C0uBT1jNconD9K1JQlTZoMIKeIK+b5LogdaJJyjZl3qnG6RXLL8ytlVAJjXNW/nlXE v2qnN8yFrwViQKgn7uGRlNn92h1hGUurYpHixOpDJZ/wPAC9lumu1B5xQ5OTFD20WuNc 0DGTa7XS+rVAKFqoD7G9bHT7GvTZah4N2n0IrGe7Hh3NkfEDNrz6YZ0nOozZQWztABJZ PlnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Z6to2lyD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk18si5694700edb.443.2021.02.15.17.26.16; Mon, 15 Feb 2021 17:26:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Z6to2lyD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229708AbhBPBYw (ORCPT + 99 others); Mon, 15 Feb 2021 20:24:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbhBPBYp (ORCPT ); Mon, 15 Feb 2021 20:24:45 -0500 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3035C061786 for ; Mon, 15 Feb 2021 17:24:04 -0800 (PST) Received: by mail-io1-xd2a.google.com with SMTP id n14so8636351iog.3 for ; Mon, 15 Feb 2021 17:24:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PJye+kSqwOydCXOrUXNte65cKiZnVuosg0HZqWH3+fk=; b=Z6to2lyDuRB0FdW0XxBmvurM//wT02lgv7/r0jT3SZT8EoPCTJbQbu+21VSGtSFtnH f/1ZTL1soBUcwgxsnwyw9E9bOw+XPNRw7+WQydmwJvkO6vMhJnSDbmxLGOdgo+HgOJGm iTCONinJWFfd5/8g4wN2JvKprciXK1rqs+CeLZyHH/NYkfOtiT/r6Jut6Jl+Yx4pdle0 I2UuvvHMKbTyPXo1BGr6kg6XaZA8559c7j7pRqWYlnMAoa/M3O5JIMy3xsjzAl4HxkaQ vKYKSR2g7om/Y1GK8W6j7oFr4ISm7mpYQr6qki4RexrpRuzJj5DWnota8scYukdXz68Y rxtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PJye+kSqwOydCXOrUXNte65cKiZnVuosg0HZqWH3+fk=; b=nra9sx1BYaAZeWYsxRm3omiSELQQYwm0EPlH0/aXCBSQE7TgSpelxHSCIzAPMvOCH/ n8mW6fLXrYtLy0Mpd3FYgK2cNJrPkrqoLpHU7KiXePnsfH0i7PukKJd8pUhJ0xP6G0gf 1P5AeihpXeKfDUuxb8F8SF0OLqZcteSBVKae6Q9ZkhThImbpiarJrC9wMwT/8ooeVJ7/ rshiFUEIK4dCaJMudX/Z3QHMTEKYw/JZoMEkg8NSyyc8BE7Jv27EGj7DkwK1P3otn89Z E05rhDuBpVtwUw0H07mPkNywgo6pnZmpHSMXYDq+iT2EhTX0YN5h/BnHzqoWKrD2wYOl ohwQ== X-Gm-Message-State: AOAM530uHD6TJrKhvvGFVAUU30467umK7iMJNkzd/SB6MK2MIxUIxc5Z DY04JY46g01Zq04SEcj0Nri6POmkGhD7PGyk9TnblA== X-Received: by 2002:a5d:93c2:: with SMTP id j2mr15222418ioo.166.1613438643994; Mon, 15 Feb 2021 17:24:03 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Lorenzo Colitti Date: Tue, 16 Feb 2021 10:23:52 +0900 Message-ID: Subject: Re: [PATCH] USB: gadget: Fix a configfs return code To: Dan Carpenter Cc: Felipe Balbi , Greg Kroah-Hartman , Nishad Kamdar , David Lechner , linux-usb@vger.kernel.org, lkml , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 12:57 AM Dan Carpenter wrote: > { \ > struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \ > - int ret; \ > + int ret = -EINVAL; \ > u8 val; \ > \ > mutex_lock(&opts->lock); \ > - ret = sscanf(page, "%02hhx", &val); \ > - if (ret > 0) { \ > + if (sscanf(page, "%02hhx", &val) > 0) { \ > opts->_n_ = val; \ > ret = len; \ > } \ Acked-by: Lorenzo Colitti