Commit 5bd0116d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-6.18-2' of https://github.com/cminyard/linux-ipmi

Pull IPMI fixes from Corey Minyard:
 "A few bug fixes for patches that went in this release: a refcount
  error and some missing or incorrect error checks"

* tag 'for-linus-6.18-2' of https://github.com/cminyard/linux-ipmi:
  ipmi: Fix handling of messages with provided receive message pointer
  mfd: ls2kbmc: check for devm_mfd_add_devices() failure
  mfd: ls2kbmc: Fix an IS_ERR() vs NULL check in probe()
parents 3a866087 e2c69490
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2301,8 +2301,11 @@ static int i_ipmi_request(struct ipmi_user *user,
	if (supplied_recv) {
		recv_msg = supplied_recv;
		recv_msg->user = user;
		if (user)
		if (user) {
			atomic_inc(&user->nr_msgs);
			/* The put happens when the message is freed. */
			kref_get(&user->refcount);
		}
	} else {
		recv_msg = ipmi_alloc_recv_msg(user);
		if (IS_ERR(recv_msg))
+8 −4
Original line number Diff line number Diff line
@@ -469,7 +469,7 @@ static int ls2k_bmc_probe(struct pci_dev *dev, const struct pci_device_id *id)
		return ret;

	ddata = devm_kzalloc(&dev->dev, sizeof(*ddata), GFP_KERNEL);
	if (IS_ERR(ddata)) {
	if (!ddata) {
		ret = -ENOMEM;
		goto disable_pci;
	}
@@ -495,9 +495,13 @@ static int ls2k_bmc_probe(struct pci_dev *dev, const struct pci_device_id *id)
		goto disable_pci;
	}

	return devm_mfd_add_devices(&dev->dev, PLATFORM_DEVID_AUTO,
	ret = devm_mfd_add_devices(&dev->dev, PLATFORM_DEVID_AUTO,
				   ls2k_bmc_cells, ARRAY_SIZE(ls2k_bmc_cells),
				   &dev->resource[0], 0, NULL);
	if (ret)
		goto disable_pci;

	return 0;

disable_pci:
	pci_disable_device(dev);