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

Commit 42d0631b authored by Anda-Maria Nicolae's avatar Anda-Maria Nicolae Committed by Sebastian Reichel
Browse files

bq2415x_charger: Remove unnecessary else after return



Fix coding style to comply with checkpatch.pl

Signed-off-by: default avatarAnda-Maria Nicolae <anda-maria.nicolae@intel.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 1d93b850
Loading
Loading
Loading
Loading
+8 −16
Original line number Original line Diff line number Diff line
@@ -346,7 +346,6 @@ static int bq2415x_exec_command(struct bq2415x_device *bq,
			BQ2415X_BIT_CE);
			BQ2415X_BIT_CE);
		if (ret < 0)
		if (ret < 0)
			return ret;
			return ret;
		else
		return ret > 0 ? 0 : 1;
		return ret > 0 ? 0 : 1;
	case BQ2415X_CHARGER_ENABLE:
	case BQ2415X_CHARGER_ENABLE:
		return bq2415x_i2c_write_bit(bq, BQ2415X_REG_CONTROL,
		return bq2415x_i2c_write_bit(bq, BQ2415X_REG_CONTROL,
@@ -420,19 +419,16 @@ static enum bq2415x_chip bq2415x_detect_chip(struct bq2415x_device *bq)
		case 0:
		case 0:
			if (bq->chip == BQ24151A)
			if (bq->chip == BQ24151A)
				return bq->chip;
				return bq->chip;
			else
			return BQ24151;
			return BQ24151;
		case 1:
		case 1:
			if (bq->chip == BQ24150A ||
			if (bq->chip == BQ24150A ||
				bq->chip == BQ24152 ||
				bq->chip == BQ24152 ||
				bq->chip == BQ24155)
				bq->chip == BQ24155)
				return bq->chip;
				return bq->chip;
			else
			return BQ24150;
			return BQ24150;
		case 2:
		case 2:
			if (bq->chip == BQ24153A)
			if (bq->chip == BQ24153A)
				return bq->chip;
				return bq->chip;
			else
			return BQ24153;
			return BQ24153;
		default:
		default:
			return BQUNKNOWN;
			return BQUNKNOWN;
@@ -444,7 +440,6 @@ static enum bq2415x_chip bq2415x_detect_chip(struct bq2415x_device *bq)
		case 0:
		case 0:
			if (bq->chip == BQ24156A)
			if (bq->chip == BQ24156A)
				return bq->chip;
				return bq->chip;
			else
			return BQ24156;
			return BQ24156;
		case 2:
		case 2:
			return BQ24158;
			return BQ24158;
@@ -474,7 +469,6 @@ static int bq2415x_detect_revision(struct bq2415x_device *bq)
	case BQ24152:
	case BQ24152:
		if (ret >= 0 && ret <= 3)
		if (ret >= 0 && ret <= 3)
			return ret;
			return ret;
		else
		return -1;
		return -1;
	case BQ24153:
	case BQ24153:
	case BQ24153A:
	case BQ24153A:
@@ -485,12 +479,10 @@ static int bq2415x_detect_revision(struct bq2415x_device *bq)
			return 0;
			return 0;
		else if (ret == 1)
		else if (ret == 1)
			return 1;
			return 1;
		else
		return -1;
		return -1;
	case BQ24155:
	case BQ24155:
		if (ret == 3)
		if (ret == 3)
			return 3;
			return 3;
		else
		return -1;
		return -1;
	case BQUNKNOWN:
	case BQUNKNOWN:
		return -1;
		return -1;