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

Commit fef5675e authored by Kevin McKinney's avatar Kevin McKinney Committed by Greg Kroah-Hartman
Browse files

Staging: bcm: Clean up patch that calls semaphore down_trylock directly.



This patch evaluates/calls the down_trylock locking
function directly, instead of storing the results
in a variable and evaluating the variable. These
changes were made in:
IOCTL_BCM_BUFFER_DOWNLOAD_STOP and
IOCTL_BCM_BUFFER_DOWNLOAD_START.

Signed-off-by: default avatarKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 70bd4399
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -756,8 +756,7 @@ cntrlEnd:
	}

	case IOCTL_BCM_BUFFER_DOWNLOAD_START: {
		INT NVMAccess = down_trylock(&Adapter->NVMRdmWrmLock);
		if (NVMAccess) {
		if (down_trylock(&Adapter->NVMRdmWrmLock)) {
			BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
					"IOCTL_BCM_CHIP_RESET not allowed as EEPROM Read/Write is in progress\n");
			return -EACCES;
@@ -862,9 +861,7 @@ cntrlEnd:
	}

	case IOCTL_BCM_BUFFER_DOWNLOAD_STOP: {
		INT NVMAccess = down_trylock(&Adapter->NVMRdmWrmLock);

		if (NVMAccess) {
		if (down_trylock(&Adapter->NVMRdmWrmLock)) {
			BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
					"FW download blocked as EEPROM Read/Write is in progress\n");
			up(&Adapter->fw_download_sema);