Re: [PATCH v3, 01/15] media: mtk-vcodec: Get numbers of register bases from DT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 27, 2021 at 06:10:37PM +0800, Yunfei Dong wrote:
> +static int mtk_vcodec_get_reg_bases(struct mtk_vcodec_dev *dev)
> +{
> +     struct platform_device *pdev = dev->plat_dev;
> +     int reg_num, i, ret = 0;
ret don't need to be initialized.

> +     for (i = 0; i < reg_num; i++) {
> +             dev->reg_base[i] = devm_platform_ioremap_resource(pdev, i);
> +             if (IS_ERR((__force void *)dev->reg_base[i])) {
> +                     return PTR_ERR((__force void *)dev->reg_base[i]);
> +             }
{ } can be removed.



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux