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

Commit 8e8114de authored by Dan Carpenter's avatar Dan Carpenter Committed by Emmanuel Grumbach
Browse files

iwlwifi: mvm: catch underflow error earlier



My static checker complains that we don't check for underflows in
iwl_dbgfs_fw_dbg_conf_write().  This is harmless because we have a
sanity check in iwl_mvm_start_fw_dbg_conf(), but we may as well make
this unsigned and silence the underflow warning.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent ecc7c518
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -949,9 +949,10 @@ static ssize_t iwl_dbgfs_fw_dbg_conf_write(struct iwl_mvm *mvm,
					   char *buf, size_t count,
					   loff_t *ppos)
{
	int ret, conf_id;
	unsigned int conf_id;
	int ret;

	ret = kstrtoint(buf, 0, &conf_id);
	ret = kstrtouint(buf, 0, &conf_id);
	if (ret)
		return ret;