1 From 0daf46fdbd37627411f3a0dd99390ee4523de1bb Mon Sep 17 00:00:00 2001
2 From: Vladimir Serbinenko <phcoder@gmail.com>
3 Date: Tue, 27 Jan 2015 15:31:35 +0000
4 Subject: fs/zfs: Fix error handling.
6 Found by: Coverity Scan.
8 (limited to 'grub-core/fs/zfs')
10 diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c
11 index c8c7b97..9edac50 100644
12 --- a/grub-core/fs/zfs/zfs.c
13 +++ b/grub-core/fs/zfs/zfs.c
14 @@ -285,7 +285,7 @@ static const char *spa_feature_names[] = {
17 check_feature(const char *name, grub_uint64_t val, struct grub_zfs_dir_ctx *ctx);
20 check_mos_features(dnode_phys_t *mosmdn_phys,grub_zfs_endian_t endian,struct grub_zfs_data* data );
23 @@ -1975,7 +1975,7 @@ dmu_read (dnode_end_t * dn, grub_uint64_t blkid, void **buf,
26 *buf = grub_malloc (size);
32 @@ -3979,7 +3979,12 @@ iterate_zap (const char *name, grub_uint64_t val, struct grub_zfs_dir_ctx *ctx)
34 grub_memset (&info, 0, sizeof (info));
36 - dnode_get (&(ctx->data->subvol.mdn), val, 0, &dn, ctx->data);
37 + err = dnode_get (&(ctx->data->subvol.mdn), val, 0, &dn, ctx->data);
40 + grub_print_error ();
44 if (dn.dn.dn_bonustype == DMU_OT_SA)
46 @@ -4200,11 +4205,11 @@ check_feature (const char *name, grub_uint64_t val,
52 check_mos_features(dnode_phys_t *mosmdn_phys,grub_zfs_endian_t endian,struct grub_zfs_data* data )
55 - grub_uint8_t errnum = 0;
56 + grub_err_t errnum = 0;
57 dnode_end_t dn,mosmdn;
59 grub_zfs_endian_t endianzap;