From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Wed, 14 Jan 2015 16:17:17 +0100 Subject: [U-Boot] [PATCH 09/11] fpga: xilinx: Check if fpga operations are defined In-Reply-To: References: <636a59f550d5e7a0e65b12cf1c07168e47763607.1421226271.git.michal.simek@xilinx.com> <4329830f6f155ea498e42c03d1e219a1d8cfcf91.1421226271.git.michal.simek@xilinx.com> Message-ID: <54B6887D.9040405@monstr.eu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/14/2015 04:14 PM, Simon Glass wrote: > On 14 January 2015 at 01:04, Michal Simek wrote: >> Ensure that operations are correctly setup. >> >> Signed-off-by: Michal Simek > > Reviewed-by: Simon Glass > > (comment below) > >> --- >> >> drivers/fpga/xilinx.c | 17 +++++++++++++++-- >> 1 file changed, 15 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c >> index adb4b8cd25fd..9c95148b25c1 100644 >> --- a/drivers/fpga/xilinx.c >> +++ b/drivers/fpga/xilinx.c >> @@ -139,6 +139,11 @@ int xilinx_load(xilinx_desc *desc, const void *buf, size_t bsize, >> return FPGA_FAIL; >> } >> >> + if (!desc->operations || !desc->operations->load) { >> + printf("%s: Missing load operation\n", __func__); >> + return FPGA_FAIL; > > I wonder if these error codes should be dropped in favour of the > standard ones? Perhaps in a separate patch. E.g. here we could use > -ENOSYS. Definitely. They are bogus. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: