Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c799d153 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdog
  hwmon: (asus_atk0110) Do not fail if MBIF is missing
  hwmon: (amc6821) Double unlock bug
  hwmon: (smsc47m1) Fix section mismatch
parents abefedd5 c453615f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -686,7 +686,6 @@ static ssize_t set_fan1_div(
		data->fan1_div = 4;
		break;
	default:
		mutex_unlock(&data->update_lock);
		count = -EINVAL;
		goto EXIT;
	}
+9 −10
Original line number Diff line number Diff line
@@ -1329,17 +1329,16 @@ static int atk_add(struct acpi_device *device)
			&buf, ACPI_TYPE_PACKAGE);
	if (ret != AE_OK) {
		dev_dbg(&device->dev, "atk: method MBIF not found\n");
		err = -ENODEV;
		goto out;
	}

	} else {
		obj = buf.pointer;
	if (obj->package.count >= 2 &&
			obj->package.elements[1].type == ACPI_TYPE_STRING) {
		if (obj->package.count >= 2) {
			union acpi_object *id = &obj->package.elements[1];
			if (id->type == ACPI_TYPE_STRING)
				dev_dbg(&device->dev, "board ID = %s\n",
				obj->package.elements[1].string.pointer);
					id->string.pointer);
		}
		ACPI_FREE(buf.pointer);
	}

	err = atk_probe_if(data);
	if (err) {
+5 −2
Original line number Diff line number Diff line
@@ -768,6 +768,7 @@ leave:
static int watchdog_open(struct inode *inode, struct file *filp)
{
	struct fschmd_data *pos, *data = NULL;
	int watchdog_is_open;

	/* We get called from drivers/char/misc.c with misc_mtx hold, and we
	   call misc_register() from fschmd_probe() with watchdog_data_mutex
@@ -782,10 +783,12 @@ static int watchdog_open(struct inode *inode, struct file *filp)
		}
	}
	/* Note we can never not have found data, so we don't check for this */
	watchdog_is_open = test_and_set_bit(0, &data->watchdog_is_open);
	if (!watchdog_is_open)
		kref_get(&data->kref);
	mutex_unlock(&watchdog_data_mutex);

	if (test_and_set_bit(0, &data->watchdog_is_open))
	if (watchdog_is_open)
		return -EBUSY;

	/* Start the watchdog */
+1 −1
Original line number Diff line number Diff line
@@ -488,7 +488,7 @@ static int __init smsc47m1_find(unsigned short *addr,
}

/* Restore device to its initial state */
static void __init smsc47m1_restore(const struct smsc47m1_sio_data *sio_data)
static void smsc47m1_restore(const struct smsc47m1_sio_data *sio_data)
{
	if ((sio_data->activate & 0x01) == 0) {
		superio_enter();