Skip to content

Commit

Permalink
eeprom: idt_89hpesx: clean up an error pointer vs NULL inconsistency
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Aug 2, 2018
1 parent 81ae962 commit c01513b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/eeprom/idt_89hpesx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c01513b

Please sign in to comment.