re: efi: split efisubsystem from efivars

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Tom Gundersen,

The patch a9499fa7cd3f: "efi: split efisubsystem from efivars" from
Feb 8, 2013, leads to the following static checker warning:

	fs/super.c:1094 mount_single()
	error: passing non negative 1 to ERR_PTR

drivers/firmware/efi/efivars.c
   638  static int efivar_update_sysfs_entry(efi_char16_t *name, efi_guid_t vendor,
   639                                       unsigned long name_size, void *data)
   640  {
   641          struct efivar_entry *entry = data;
   642  
   643          if (efivar_entry_find(name, vendor, &efivar_sysfs_list, false))
   644                  return 0;
   645  
   646          memcpy(entry->var.VariableName, name, name_size);
   647          memcpy(&(entry->var.VendorGuid), &vendor, sizeof(efi_guid_t));
   648  
   649          return 1;

The comments imply that this should return 0 on success and negative
error codes on failure.

   650  }
   651  


The function is called from efivar_init() as a pointer.

   663                  err = efivar_init(efivar_update_sysfs_entry, entry,
   664                                    false, &efivar_sysfs_list);

The comments on efivar_init() say it should return zero on success or a
negative error code.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux