From mboxrd@z Thu Jan 1 00:00:00 1970 From: Or Gerlitz Subject: Re: [net 3/6] net/mlx5: FPGA, return -EINVAL if size is zero Date: Wed, 8 Nov 2017 23:13:05 +0900 Message-ID: References: <20171108072142.30870-1-saeedm@mellanox.com> <20171108072142.30870-4-saeedm@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Saeed Mahameed , Linux Netdev List , David Miller To: Yevgeny Kliteynik , Kamal Heib Return-path: Received: from mail-ot0-f171.google.com ([74.125.82.171]:44718 "EHLO mail-ot0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752528AbdKHONH (ORCPT ); Wed, 8 Nov 2017 09:13:07 -0500 Received: by mail-ot0-f171.google.com with SMTP id j24so1849806otb.1 for ; Wed, 08 Nov 2017 06:13:07 -0800 (PST) In-Reply-To: <20171108072142.30870-4-saeedm@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Nov 8, 2017 at 4:21 PM, Saeed Mahameed wrote: > From: Kamal Heib > > In the current code, if a size of zero is passed to > mlx5_fpga_mem_{read|write}_i2c() functions the "err" Don't we need to fix the call site where zero size is provided and not in called function? Isn't sending down a zero size a sign for a bug which we are not fixing? > return value will not initialized. > > Fixes: a9956d35d199 ('net/mlx5: FPGA, Add SBU infrastructure') > Signed-off-by: Kamal Heib > Reviewed-by: Yevgeny Kliteynik > Signed-off-by: Saeed Mahameed