Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: anysee: simplify the return expression of anysee_ci_* function

Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Liu Shixin and committed by
Mauro Carvalho Chehab
3101010f e56429b0

+3 -18
+3 -18
drivers/media/usb/dvb-usb-v2/anysee.c
··· 1171 1171 int addr, u8 val) 1172 1172 { 1173 1173 struct dvb_usb_device *d = ci->data; 1174 - int ret; 1175 1174 u8 buf[] = {CMD_CI, 0x03, 0x40 | addr >> 8, addr & 0xff, 0x00, 1, val}; 1176 1175 1177 - ret = anysee_ctrl_msg(d, buf, sizeof(buf), NULL, 0); 1178 - if (ret) 1179 - return ret; 1180 - 1181 - return 0; 1176 + return anysee_ctrl_msg(d, buf, sizeof(buf), NULL, 0); 1182 1177 } 1183 1178 1184 1179 static int anysee_ci_read_cam_control(struct dvb_ca_en50221 *ci, int slot, ··· 1195 1200 u8 addr, u8 val) 1196 1201 { 1197 1202 struct dvb_usb_device *d = ci->data; 1198 - int ret; 1199 1203 u8 buf[] = {CMD_CI, 0x05, 0x40, addr, 0x00, 1, val}; 1200 1204 1201 - ret = anysee_ctrl_msg(d, buf, sizeof(buf), NULL, 0); 1202 - if (ret) 1203 - return ret; 1204 - 1205 - return 0; 1205 + return anysee_ctrl_msg(d, buf, sizeof(buf), NULL, 0); 1206 1206 } 1207 1207 1208 1208 static int anysee_ci_slot_reset(struct dvb_ca_en50221 *ci, int slot) ··· 1242 1252 static int anysee_ci_slot_ts_enable(struct dvb_ca_en50221 *ci, int slot) 1243 1253 { 1244 1254 struct dvb_usb_device *d = ci->data; 1245 - int ret; 1246 1255 1247 - ret = anysee_wr_reg_mask(d, REG_IOD, (0 << 1), 0x02); 1248 - if (ret) 1249 - return ret; 1250 - 1251 - return 0; 1256 + return anysee_wr_reg_mask(d, REG_IOD, (0 << 1), 0x02); 1252 1257 } 1253 1258 1254 1259 static int anysee_ci_poll_slot_status(struct dvb_ca_en50221 *ci, int slot,