All of lore.kernel.org
 help / color / mirror / Atom feed
* re: efi: split efisubsystem from efivars
@ 2016-06-15 13:05 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-06-15 13:05 UTC (permalink / raw)
  To: teg; +Cc: linux-fsdevel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-15 13:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-15 13:05 efi: split efisubsystem from efivars Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.