[PATCH] fixup-next: linux/nvmem-consumer.h: fix warning

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

 



This fixes the commit 06825a0ec35343a1
("nvmem: import Linux nvmem_cell_read_variable_le_u32")
from the next branch.

The warning is:

include/linux/nvmem-consumer.h:84:9: warning: returning 'void *' from a
function with return type 'int' makes integer from pointer without a
cast [-Wint-conversion]
   84 |  return ERR_PTR(-EOPNOTSUPP);
      |         ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Antony Pavlov <antonynpavlov@xxxxxxxxx>
---
 include/linux/nvmem-consumer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index b461f840957..1fce7e1ae09 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -81,7 +81,7 @@ static inline int nvmem_cell_read_variable_le_u32(struct device_d *dev,
 						  const char *cell_id,
 						  u32 *val)
 {
-	return ERR_PTR(-EOPNOTSUPP);
+	return -EOPNOTSUPP;
 }
 
 static inline int nvmem_cell_write(struct nvmem_cell *cell,
-- 
2.37.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux