* [PATCH] eeprom: idt_89hpesx: clean up an error pointer vs NULL inconsistency
@ 2018-08-02 8:27 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2018-08-02 8:27 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, Huy Duong, Serge Semin, Rob Herring,
linux-kernel, kernel-janitors
We check for IS_ERR_OR_NULL() here, but later we check the same thing
for NULL only. It turns out that it can only be NULL so we can make the
checking consistent by removing the ERR_PTR stuff.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c
index 119eb05a5a91..8a4659518c33 100644
--- a/drivers/misc/eeprom/idt_89hpesx.c
+++ b/drivers/misc/eeprom/idt_89hpesx.c
@@ -1128,7 +1128,7 @@ static void idt_get_fw_data(struct idt_89hpesx_dev *pdev)
device_for_each_child_node(dev, fwnode) {
ee_id = idt_ee_match_id(fwnode);
- if (IS_ERR_OR_NULL(ee_id)) {
+ if (!ee_id) {
dev_warn(dev, "Skip unsupported EEPROM device");
continue;
} else
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] eeprom: idt_89hpesx: clean up an error pointer vs NULL inconsistency
@ 2018-08-02 8:27 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2018-08-02 8:27 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, Huy Duong, Serge Semin, Rob Herring,
linux-kernel, kernel-janitors
We check for IS_ERR_OR_NULL() here, but later we check the same thing
for NULL only. It turns out that it can only be NULL so we can make the
checking consistent by removing the ERR_PTR stuff.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c
index 119eb05a5a91..8a4659518c33 100644
--- a/drivers/misc/eeprom/idt_89hpesx.c
+++ b/drivers/misc/eeprom/idt_89hpesx.c
@@ -1128,7 +1128,7 @@ static void idt_get_fw_data(struct idt_89hpesx_dev *pdev)
device_for_each_child_node(dev, fwnode) {
ee_id = idt_ee_match_id(fwnode);
- if (IS_ERR_OR_NULL(ee_id)) {
+ if (!ee_id) {
dev_warn(dev, "Skip unsupported EEPROM device");
continue;
} else
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-02 8:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-02 8:27 [PATCH] eeprom: idt_89hpesx: clean up an error pointer vs NULL inconsistency Dan Carpenter
2018-08-02 8:27 ` 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.