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

Commit 0296951a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

USB: mon_bin.c: move assignment out of if () block



We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
parent 925f0042
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -675,7 +675,8 @@ static int mon_bin_open(struct inode *inode, struct file *file)
	int rc;

	mutex_lock(&mon_lock);
	if ((mbus = mon_bus_lookup(iminor(inode))) == NULL) {
	mbus = mon_bus_lookup(iminor(inode));
	if (mbus == NULL) {
		mutex_unlock(&mon_lock);
		return -ENODEV;
	}
@@ -1018,8 +1019,8 @@ static long mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg
			return -EINVAL;

		size = CHUNK_ALIGN(arg);
		if ((vec = kzalloc(sizeof(struct mon_pgmap) * (size/CHUNK_SIZE),
		    GFP_KERNEL)) == NULL) {
		vec = kzalloc(sizeof(struct mon_pgmap) * (size / CHUNK_SIZE), GFP_KERNEL);
		if (vec == NULL) {
			ret = -ENOMEM;
			break;
		}