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

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

Staging: bcm: Fix three initialization errors in InterfaceDld.c



This patch fixes three initialization errors.
One is an incorrect initialization of a static
variable. The other two are incorrect
initializations in an if statement. These
errors were found by checkpatch.pl.

Signed-off-by: default avatarKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a5e4b81e
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -59,7 +59,7 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_c
	mm_segment_t oldfs = {0};
	mm_segment_t oldfs = {0};
	int errno = 0, len = 0, is_config_file = 0;
	int errno = 0, len = 0, is_config_file = 0;
	loff_t pos = 0;
	loff_t pos = 0;
	static int fw_down = 0;
	static int fw_down;
	INT Status = STATUS_SUCCESS;
	INT Status = STATUS_SUCCESS;
	PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)arg;
	PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)arg;


@@ -136,10 +136,10 @@ static int bcm_download_config_file(PMINI_ADAPTER Adapter, FIRMWARE_INFO *psFwIn
	B_UINT32 value = 0;
	B_UINT32 value = 0;


	if (Adapter->pstargetparams == NULL) {
	if (Adapter->pstargetparams == NULL) {
		if ((Adapter->pstargetparams = kmalloc(sizeof(STARGETPARAMS), GFP_KERNEL)) == NULL) {
		Adapter->pstargetparams = kmalloc(sizeof(STARGETPARAMS), GFP_KERNEL);
		if (Adapter->pstargetparams == NULL)
			return -ENOMEM;
			return -ENOMEM;
	}
	}
	}


	if (psFwInfo->u32FirmwareLength != sizeof(STARGETPARAMS))
	if (psFwInfo->u32FirmwareLength != sizeof(STARGETPARAMS))
		return -EIO;
		return -EIO;
@@ -317,7 +317,8 @@ static INT buffRdbkVerify(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32Fi
			break;
			break;
		}
		}


		if (STATUS_SUCCESS != (retval = bcm_compare_buff_contents(readbackbuff, mappedbuffer, len)))
		retval = bcm_compare_buff_contents(readbackbuff, mappedbuffer, len);
		if (STATUS_SUCCESS != retval)
			break;
			break;


		u32StartingAddress += len;
		u32StartingAddress += len;